summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-01-11 19:41:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-01-11 19:41:13 -0400
commite2af0914faf487464046e0a60d20a638add1790d (patch)
tree753bb6b82627df13c50de13342c2ecfa26f4e148
parentcc7db6f058f69a1a0f08221f46d2d12d3d3764bf (diff)
fsck: Fix bug in moving of corrupted files to .git/annex/bad/
-rw-r--r--Core.hs3
-rw-r--r--debian/changelog1
2 files changed, 3 insertions, 1 deletions
diff --git a/Core.hs b/Core.hs
index 08e226592..d59120d67 100644
--- a/Core.hs
+++ b/Core.hs
@@ -173,7 +173,8 @@ moveBad key = do
g <- Annex.gitRepo
let src = annexLocation g key
let dest = annexBadLocation g ++ takeFileName src
- liftIO $ createDirectoryIfMissing True dest
+ liftIO $ createDirectoryIfMissing True (parentDir dest)
+ liftIO $ allowWrite (parentDir src)
liftIO $ renameFile src dest
liftIO $ removeDirectory (parentDir src)
return dest
diff --git a/debian/changelog b/debian/changelog
index 96acc592c..c826fb7d6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ git-annex (0.18) UNRELEASED; urgency=low
* Bugfix: `copy --to` and `move --to` forgot to stage location log changes
after transferring the file to the remote repository.
(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