mirror of
https://github.com/l1ving/youtube-dl
synced 2024-11-22 01:52:51 +08:00
Fixed failure of os.rename after receiving file finished due to file not being closed.
Following error happen while at the end of _do_download called try_rename WindowsError: [Error 32] The process cannot access the file because it is being used by another process
This commit is contained in:
parent
a9806fd83d
commit
6f0ff3bab9
@ -640,6 +640,7 @@ class FileDownloader(object):
|
|||||||
# Apply rate limit
|
# Apply rate limit
|
||||||
self.slow_down(start, byte_counter)
|
self.slow_down(start, byte_counter)
|
||||||
|
|
||||||
|
stream.close()
|
||||||
self.report_finish()
|
self.report_finish()
|
||||||
if data_len is not None and str(byte_counter) != data_len:
|
if data_len is not None and str(byte_counter) != data_len:
|
||||||
raise ContentTooShortError(byte_counter, long(data_len))
|
raise ContentTooShortError(byte_counter, long(data_len))
|
||||||
|
Loading…
Reference in New Issue
Block a user