diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-05 13:42:31 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-05 13:42:31 -0400 |
commit | 1cf23b8adc1d9b680083b8f04f2ec9a199550462 (patch) | |
tree | e5b809a3b106d77725660b78a4a244197781ab2c /Command | |
parent | b73a3fa6461ae98302a1c98d90588dd748304961 (diff) |
committer: Fix a file handle leak.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Add.hs | 3 |
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 } |