aboutsummaryrefslogtreecommitdiff
path: root/Version.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-12-02 21:07:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-12-02 21:07:16 -0400
commit83a87a522903e18a16ae19e1b741ab4e1f2b95a6 (patch)
treea46a7958bbd7ec444f0eb60310199f82cfff4b03 /Version.hs
parentd1b5ef9565cfc5991a473985a36fe00c9384ece5 (diff)
Improve detection of version 0 repos.
Diffstat (limited to 'Version.hs')
-rw-r--r--Version.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Version.hs b/Version.hs
index 839470120..fc1ce3d7e 100644
--- a/Version.hs
+++ b/Version.hs
@@ -29,9 +29,11 @@ getVersion = do
then return $ Just v
else do
-- version 0 was not recorded in .git/config;
- -- such a repo should have an annexDir
+ -- such a repo should have an annexDir but no
+ -- annexObjectDir
d <- liftIO $ doesDirectoryExist $ annexDir g
- if d
+ o <- liftIO $ doesDirectoryExist $ annexObjectDir g
+ if d && not o
then return $ Just "0"
else return Nothing -- no version yet