uninit: Fix crash due to trying to write to deleted keys db.

Reversion introduced by v6 mode support, affects v5 too.

Also fix a similar crash when the webapp is used to delete a repository.
This commit is contained in:
Joey Hess 2016-07-12 14:18:35 -04:00
parent db6b307ef7
commit 0c713a94bd
Failed to extract signature
6 changed files with 42 additions and 14 deletions

View file

@ -1837,7 +1837,7 @@ cleanup = cleanup' False
cleanup' :: Bool -> FilePath -> IO ()
cleanup' final dir = whenM (doesDirectoryExist dir) $ do
Command.Uninit.prepareRemoveAnnexDir dir
Command.Uninit.prepareRemoveAnnexDir' dir
-- This sometimes fails on Windows, due to some files
-- being still opened by a subprocess.
catchIO (removeDirectoryRecursive dir) $ \e ->