[downloader] Fix temporary file name in result handler

This commit is contained in:
derrod 2020-08-06 09:28:25 +02:00
parent faa460a0de
commit 5b4a6e6d9f

View file

@ -524,6 +524,9 @@ class DLManager(Process):
self.num_tasks_processed_since_last += 1
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]
# write last completed file to super simple resume file
with open(self.resume_file, 'ab') as rf: