make upgrade more robust
don't remove .git-annex until state has been succeffully saved
This commit is contained in:
parent
d31b84c777
commit
d360ca3ed9
1 changed files with 5 additions and 3 deletions
|
@ -54,11 +54,13 @@ upgrade = do
|
|||
when e $ do
|
||||
mapM_ (\(k, f) -> inject f $ logFile k) =<< locationLogs g
|
||||
mapM_ (\f -> inject f f) =<< logFiles (olddir g)
|
||||
liftIO $ do
|
||||
Git.run g "rm" [Param "-r", Param "-f", Param "-q", File (olddir g)]
|
||||
unless bare $ gitAttributesUnWrite g
|
||||
|
||||
saveState
|
||||
|
||||
when e $ liftIO $ do
|
||||
Git.run g "rm" [Param "-r", Param "-f", Param "-q", File (olddir g)]
|
||||
unless bare $ gitAttributesUnWrite g
|
||||
|
||||
unless bare $ push
|
||||
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue