fix autoremover #2
parent
1b14417188
commit
fccc2a59fa
|
@ -16,7 +16,7 @@ def remove_old_files(today_date: datetime.datetime, keep_days: int, root_path: s
|
|||
older_date = today_date - datetime.timedelta(days=keep_days)
|
||||
last_date = today_date - datetime.timedelta(days=keep_days)
|
||||
|
||||
while older_date > (older_date - datetime.timedelta(days=10)):
|
||||
while older_date > older_date - datetime.timedelta(days=10):
|
||||
older_date = older_date - datetime.timedelta(days=1)
|
||||
|
||||
if last_date.year > older_date.year and Path(folder_path_year_creator(date=older_date, default_path=root_path)).exists():
|
||||
|
|
Loading…
Reference in New Issue