Skip to content

Commit

Permalink
Fix for warning on non-existent destination path
Browse files Browse the repository at this point in the history
  • Loading branch information
john-corcoran committed Jul 27, 2021
1 parent a46ad0b commit 8bab655
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ia_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ class CacheDict:
]
)
if len(cache_files) > 0:
cache_file = cache_files[-1]
cache_file = cache_files[-1] # Get the most recent cache file
# Get datetime from filename
datetime_str = "_".join(os.path.basename(cache_file).split("_", 2)[:2])
file_datetime = datetime.datetime.strptime(datetime_str, "%Y%m%d_%H%M%S")
Expand Down Expand Up @@ -1124,7 +1124,11 @@ class CacheDict:

# Check if the output folder already seems to have all the files we expect
# Check if files in download queue equal files in folder
if len(file_paths_in_folder(os.path.join(output_folder, identifier))) > 0:
identifier_output_folder = os.path.join(output_folder, identifier)
if (
os.path.isdir(identifier_output_folder)
and len(file_paths_in_folder(identifier_output_folder)) > 0
):
size_verification = verify(
hash_file=None,
data_folders=[output_folder],
Expand Down

0 comments on commit 8bab655

Please sign in to comment.