mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[http] improvement -> removing old output path before downloading
This commit is contained in:
@@ -74,6 +74,11 @@ class AdaptableFileDownloader(FileDownloader):
|
||||
success = False
|
||||
ti = time.time()
|
||||
try:
|
||||
if os.path.exists(output_path):
|
||||
self.logger.info('Removing old file found before downloading: {}'.format(output_path))
|
||||
os.remove(output_path)
|
||||
self.logger.info("Old file {} removed".format(output_path))
|
||||
|
||||
if self.is_multithreaded():
|
||||
ti = time.time()
|
||||
process = self._get_aria2c_process(file_url, output_path, final_cwd)
|
||||
|
||||
Reference in New Issue
Block a user