Fix #1507 - Temporary file race condition in core/core.py:add_torrent_url
This commit is contained in:
parent
4870d34a52
commit
efd2762255
|
@ -254,7 +254,7 @@ class Core(component.Component):
|
||||||
log.error("Reason: %s", failure.getErrorMessage())
|
log.error("Reason: %s", failure.getErrorMessage())
|
||||||
return failure
|
return failure
|
||||||
|
|
||||||
d = download_file(url, tempfile.mkstemp()[1], headers=headers)
|
d = download_file(url, tempfile.mkstemp()[1], headers=headers, force_filename=True)
|
||||||
d.addCallback(on_get_file)
|
d.addCallback(on_get_file)
|
||||||
d.addErrback(on_get_file_error)
|
d.addErrback(on_get_file_error)
|
||||||
return d
|
return d
|
||||||
|
|
Loading…
Reference in New Issue