aboutsummaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-05 13:42:31 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-01-05 13:42:31 -0400
commit1cf23b8adc1d9b680083b8f04f2ec9a199550462 (patch)
treee5b809a3b106d77725660b78a4a244197781ab2c /Command/Add.hs
parentb73a3fa6461ae98302a1c98d90588dd748304961 (diff)
committer: Fix a file handle leak.
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 }