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
|
@ -29,10 +29,10 @@ getVersion = do
|
|||
then return $ Just v
|
||||
else do
|
||||
-- version 0 was not recorded in .git/config;
|
||||
-- such a repo should have an annexDir but no
|
||||
-- annexObjectDir
|
||||
d <- liftIO $ doesDirectoryExist $ annexDir g
|
||||
o <- liftIO $ doesDirectoryExist $ annexObjectDir g
|
||||
-- such a repo should have an gitAnnexDir but no
|
||||
-- gitAnnexObjectDir
|
||||
d <- liftIO $ doesDirectoryExist $ gitAnnexDir g
|
||||
o <- liftIO $ doesDirectoryExist $ gitAnnexObjectDir g
|
||||
if d && not o
|
||||
then return $ Just "0"
|
||||
else return Nothing -- no version yet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue