summaryrefslogtreecommitdiff
path: root/Core.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Core.hs')
-rw-r--r--Core.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Core.hs b/Core.hs
index 2a81678aa..9faaada56 100644
--- a/Core.hs
+++ b/Core.hs
@@ -203,14 +203,14 @@ fromAnnex key dest = do
removeDirectory dir
{- Moves a key out of .git/annex/objects/ into .git/annex/bad, and
- - returns the directory it was moved to. -}
+ - returns the file it was moved to. -}
moveBad :: Key -> Annex FilePath
moveBad key = do
g <- Annex.gitRepo
let src = annexLocation g key
- let dest = annexBadLocation g
+ let dest = annexBadLocation g ++ takeFileName src
liftIO $ createDirectoryIfMissing True dest
- liftIO $ renameFile src (dest ++ takeFileName src)
+ liftIO $ renameFile src dest
liftIO $ removeDirectory (parentDir src)
return dest