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.
This commit is contained in:
parent
6be516ae3b
commit
167523f09d
16 changed files with 78 additions and 57 deletions
|
@ -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 ++ "..."
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue