use new name for new format fsck db
The old db is cleaned up when a new incremental fsck is started. The incremental fsck won't pick up where the old one left off, but I consider this a minor enough thing that it can just be documented and won't be a problem.
This commit is contained in:
parent
dc9295017f
commit
1b5f4b67b5
4 changed files with 19 additions and 3 deletions
|
@ -44,6 +44,8 @@ Fscked
|
|||
|]
|
||||
|
||||
{- The database is removed when starting a new incremental fsck pass.
|
||||
-
|
||||
- (The old fsck database used before v8 is also removed here.)
|
||||
-
|
||||
- This may fail, if other fsck processes are currently running using the
|
||||
- database. Removing the database in that situation would lead to crashes
|
||||
|
@ -52,8 +54,10 @@ Fscked
|
|||
newPass :: UUID -> Annex Bool
|
||||
newPass u = isJust <$> tryExclusiveLock (gitAnnexFsckDbLock u) go
|
||||
where
|
||||
go = liftIO . void . tryIO . removeDirectoryRecursive
|
||||
=<< fromRepo (gitAnnexFsckDbDir u)
|
||||
go = do
|
||||
removedb =<< fromRepo (gitAnnexFsckDbDir u)
|
||||
removedb =<< fromRepo (gitAnnexFsckDbDirOld u)
|
||||
removedb = liftIO . void . tryIO . removeDirectoryRecursive
|
||||
|
||||
{- Opens the database, creating it if it doesn't exist yet. -}
|
||||
openDb :: UUID -> Annex FsckHandle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue