mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[downloader] Fix temporary file name in result handler
This commit is contained in:
parent
faa460a0de
commit
5b4a6e6d9f
|
@ -524,6 +524,9 @@ class DLManager(Process):
|
||||||
self.num_tasks_processed_since_last += 1
|
self.num_tasks_processed_since_last += 1
|
||||||
|
|
||||||
if res.closed and self.resume_file and res.success:
|
if res.closed and self.resume_file and res.success:
|
||||||
|
if res.filename.endswith('.tmp'):
|
||||||
|
res.filename = res.filename[:-4]
|
||||||
|
|
||||||
file_hash = self.hash_map[res.filename]
|
file_hash = self.hash_map[res.filename]
|
||||||
# write last completed file to super simple resume file
|
# write last completed file to super simple resume file
|
||||||
with open(self.resume_file, 'ab') as rf:
|
with open(self.resume_file, 'ab') as rf:
|
||||||
|
|
Loading…
Reference in a new issue