fsck: Fix bug in moving of corrupted files to .git/annex/bad/

This commit is contained in:
Joey Hess 2011-01-11 19:41:13 -04:00
parent cc7db6f058
commit e2af0914fa
2 changed files with 3 additions and 1 deletions

View file

@ -173,7 +173,8 @@ moveBad key = do
g <- Annex.gitRepo g <- Annex.gitRepo
let src = annexLocation g key let src = annexLocation g key
let dest = annexBadLocation g ++ takeFileName src let dest = annexBadLocation g ++ takeFileName src
liftIO $ createDirectoryIfMissing True dest liftIO $ createDirectoryIfMissing True (parentDir dest)
liftIO $ allowWrite (parentDir src)
liftIO $ renameFile src dest liftIO $ renameFile src dest
liftIO $ removeDirectory (parentDir src) liftIO $ removeDirectory (parentDir src)
return dest return dest

1
debian/changelog vendored
View file

@ -3,6 +3,7 @@ git-annex (0.18) UNRELEASED; urgency=low
* Bugfix: `copy --to` and `move --to` forgot to stage location log changes * Bugfix: `copy --to` and `move --to` forgot to stage location log changes
after transferring the file to the remote repository. after transferring the file to the remote repository.
(Did not affect ssh remotes.) (Did not affect ssh remotes.)
* fsck: Fix bug in moving of corrupted files to .git/annex/bad/
-- Joey Hess <joeyh@debian.org> Tue, 11 Jan 2011 16:05:25 -0400 -- Joey Hess <joeyh@debian.org> Tue, 11 Jan 2011 16:05:25 -0400