aboutsummaryrefslogtreecommitdiff
path: root/Core.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-11-13 15:42:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-11-13 15:42:56 -0400
commitaec34ee1bda9b8bcdfe54903331eae582ee32792 (patch)
tree178a3c0ec5bdd17ead11369c9b0968f777ca262f /Core.hs
parentdd573e70105706bd1a769f74af9c3006dab903d0 (diff)
tweak
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