Close temporary download file for QtWebEngine

Otherwise, Chromium won't be able to write on it on Windows - and we only
need the name anyways.
This commit is contained in:
Florian Bruhin 2017-03-29 08:46:46 +02:00
parent edb197b028
commit 2c4e549d80
2 changed files with 1 additions and 1 deletions

View File

@ -104,6 +104,7 @@ class DownloadItem(downloads.AbstractDownloadItem):
raise downloads.UnsupportedOperationError raise downloads.UnsupportedOperationError
def _set_tempfile(self, fileobj): def _set_tempfile(self, fileobj):
fileobj.close()
self._set_filename(fileobj.name, force_overwrite=True, self._set_filename(fileobj.name, force_overwrite=True,
remember_directory=False) remember_directory=False)

View File

@ -419,7 +419,6 @@ Feature: Downloading things from a website.
## opening a file directly (prompt-open-download) ## opening a file directly (prompt-open-download)
@issue2478
Scenario: Opening a download directly Scenario: Opening a download directly
When I set storage -> prompt-download-directory to true When I set storage -> prompt-download-directory to true
And I open data/downloads/download.bin without waiting And I open data/downloads/download.bin without waiting