summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-15 22:19:12 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-15 22:19:12 -0400
commit3dac81d3450da25581ad8f4bcfb615da5050767d (patch)
tree4c5985de8f291c0778122961920f156f22abfe61 /Command
parentd91950ecbad5f33e4d9ce80fc4256c55e0879cc2 (diff)
remove newly created tmp file before linking
Diffstat (limited to 'Command')
-rw-r--r--Command/Add.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index df57ba6cd..7a6696063 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -57,6 +57,7 @@ lockDown file = do
createAnnexDirectory tmp
liftIO $ do
(tmpfile, _handle) <- openTempFile tmp (takeFileName file)
+ nukeFile tmpfile
createLink file tmpfile
return $ KeySource { keyFilename = file , contentLocation = tmpfile }