fix autoremover
parent
552b438d00
commit
1b14417188
|
@ -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)):
|
||||
|
|
Loading…
Reference in New Issue