summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-23 15:38:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-23 15:38:52 -0400
commit780ee5ff6d3fdcbbe69450d40260c1083315ca47 (patch)
treecbd0047789b963dfa7e39ca48711b9b04a349064
parentc5531046bc6cd62cedfc528b844e0df9cdade177 (diff)
fix bootstrapping, broken by move of .git/annex/index
-rw-r--r--Branch.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Branch.hs b/Branch.hs
index cb2feea6a..10a790631 100644
--- a/Branch.hs
+++ b/Branch.hs
@@ -80,9 +80,10 @@ withIndex' bootstrapping a = do
let f = index g
reset <- liftIO $ Git.useIndex f
- unless bootstrapping $ do
- e <- liftIO $ doesFileExist f
- unless e $ liftIO $ genIndex g
+ e <- liftIO $ doesFileExist f
+ unless e $ liftIO $ do
+ createDirectoryIfMissing True $ takeDirectory f
+ unless bootstrapping $ genIndex g
r <- a
liftIO reset