From 167523f09d48777f3a5931fdcbc21b9d363e0e6c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Jan 2011 17:00:32 -0400 Subject: better directory handling Rename Locations functions for better consitency, and make their values more consistent too. Used rather than manually building paths. There are still more places that manually do so, but are tricky, due to the behavior of when the second FilePath is absolute. So I only changed places where it obviously was relative. --- Backend/File.hs | 2 +- Backend/SHA1.hs | 2 +- Backend/WORM.hs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Backend') diff --git a/Backend/File.hs b/Backend/File.hs index 35cbc0191..68dd4db27 100644 --- a/Backend/File.hs +++ b/Backend/File.hs @@ -77,7 +77,7 @@ copyKeyFile key file = do -- before going on to the next remote.) probablyPresent r = if not $ Git.repoIsUrl r - then liftIO $ doesFileExist $ annexLocation r key + then liftIO $ doesFileExist $ gitAnnexLocation r key else return True docopy r continue = do showNote $ "copying from " ++ Git.repoDescribe r ++ "..." diff --git a/Backend/SHA1.hs b/Backend/SHA1.hs index f8dbea4b0..3d868dbd1 100644 --- a/Backend/SHA1.hs +++ b/Backend/SHA1.hs @@ -48,7 +48,7 @@ keyValue file = do checkKeySHA1 :: Key -> Annex Bool checkKeySHA1 key = do g <- Annex.gitRepo - let file = annexLocation g key + let file = gitAnnexLocation g key present <- liftIO $ doesFileExist file if not present then return True diff --git a/Backend/WORM.hs b/Backend/WORM.hs index 56f243396..20a81d841 100644 --- a/Backend/WORM.hs +++ b/Backend/WORM.hs @@ -57,7 +57,7 @@ keySize key = read $ section !! 1 checkKeySize :: Key -> Annex Bool checkKeySize key = do g <- Annex.gitRepo - let file = annexLocation g key + let file = gitAnnexLocation g key present <- liftIO $ doesFileExist file if not present then return True -- cgit v1.2.3