summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index 25548a973..7b2d5fd30 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -60,7 +60,8 @@ lockDown file = do
tmp <- fromRepo gitAnnexTmpDir
createAnnexDirectory tmp
liftIO $ do
- (tmpfile, _handle) <- openTempFile tmp (takeFileName file)
+ (tmpfile, handle) <- openTempFile tmp (takeFileName file)
+ hClose handle
nukeFile tmpfile
createLink file tmpfile
return $ KeySource { keyFilename = file , contentLocation = tmpfile }