summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index a633db7b3..ab104b53c 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -60,8 +60,8 @@ undo file key e = do
-- fromAnnex could fail if the file ownership is weird
tryharder :: IOException -> Annex ()
tryharder _ = do
- g <- gitRepo
- liftIO $ renameFile (gitAnnexLocation g key) file
+ src <- fromRepo $ gitAnnexLocation key
+ liftIO $ renameFile src file
cleanup :: FilePath -> Key -> Bool -> CommandCleanup
cleanup file key hascontent = do