Ticket #1507: deluge-core-core.py.patch

File deluge-core-core.py.patch, 474 bytes (added by geoffk, 14 years ago)

Patch for core/core.py:add_torrent_url to use download_file with force_filename=True to fix a temporary file race condition

  • core.py

    old new  
    254254            log.error("Reason: %s", failure.getErrorMessage())
    255255            return failure
    256256
    257         d = download_file(url, tempfile.mkstemp()[1], headers=headers)
     257        d = download_file(url, tempfile.mkstemp()[1], headers=headers, force_filename=True)
    258258        d.addCallback(on_get_file)
    259259        d.addErrback(on_get_file_error)
    260260        return d