From c90652f015b370e270da8174b4ac61e454e06ffd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 26 Jun 2011 21:01:19 -0400 Subject: Always ensure git-annex branch exists. --- Branch.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Branch.hs') diff --git a/Branch.hs b/Branch.hs index 3f5e0ee1e..916261a9c 100644 --- a/Branch.hs +++ b/Branch.hs @@ -83,9 +83,10 @@ withIndex' bootstrapping a = do reset <- liftIO $ Git.useIndex f e <- liftIO $ doesFileExist f - unless e $ liftIO $ do - createDirectoryIfMissing True $ takeDirectory f - unless bootstrapping $ genIndex g + unless e $ do + unless bootstrapping $ create + liftIO $ createDirectoryIfMissing True $ takeDirectory f + liftIO $ unless bootstrapping $ genIndex g r <- a liftIO reset -- cgit v1.2.3