bittorrent: Fix locking problem when using addurl file://
Fixes: /home/joey/tmp/xxx/.git/annex/misctmp/torrent18347: openFile: resource busy (file is locked)
This commit is contained in:
parent
000fe26d44
commit
6b3d0cb11a
2 changed files with 3 additions and 1 deletions
|
@ -200,7 +200,8 @@ downloadTorrentFile u = do
|
|||
return ok
|
||||
else do
|
||||
misctmp <- fromRepo gitAnnexTmpMiscDir
|
||||
withTmpFileIn misctmp "torrent" $ \f _h -> do
|
||||
withTmpFileIn misctmp "torrent" $ \f h -> do
|
||||
liftIO $ hClose h
|
||||
ok <- Url.withUrlOptions $ Url.download u f
|
||||
when ok $
|
||||
liftIO $ renameFile f torrent
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -7,6 +7,7 @@ git-annex (5.20141220) UNRELEASED; urgency=medium
|
|||
* Run shutdown cleanup actions even if there were failures processing
|
||||
the command. Amoung other fixes, this means that addurl will stage
|
||||
added files even if adding one of the urls fails.
|
||||
* bittorrent: Fix locking problem when using addurl file://
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Mon, 22 Dec 2014 15:16:38 -0400
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue