fix autoremover

main
Jan Beníček 2024-06-21 06:47:36 +02:00
parent 552b438d00
commit 1b14417188
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ def remove_old_files(today_date: datetime.datetime, keep_days: int, root_path: s
if last_date.year > older_date.year and Path(folder_path_year_creator(date=older_date, default_path=root_path)).exists():
Path(folder_path_year_creator(date=older_date, default_path=root_path)).rmdir()
return
elif last_date.month > older_date.month and Path(folder_path_month_creator(date=older_date, default_path=root_path())).exists():
elif last_date.month > older_date.month and Path(folder_path_month_creator(date=older_date, default_path=root_path)).exists():
Path(folder_path_month_creator(date=older_date, default_path=root_path)).rmdir()
return
elif os.path.exists(file_path_creator(date=older_date, default_path=root_path)):