More lenient check for unrendered timelapses
Only delete automatically if modification AND creation date are older than the calculated cutoff.
This commit is contained in:
parent
abfcc6e5aa
commit
d1fdbd5080
1 changed files with 2 additions and 1 deletions
|
|
@ -194,7 +194,8 @@ def delete_old_unrendered_timelapses():
|
|||
if prefix in prefixes_to_clean:
|
||||
continue
|
||||
|
||||
if entry.stat().st_mtime < cutoff:
|
||||
# delete if both creation and modification time are older than the cutoff
|
||||
if max(entry.stat().st_ctime, entry.stat().st_mtime) < cutoff:
|
||||
prefixes_to_clean.append(prefix)
|
||||
except:
|
||||
if logging.getLogger(__name__).isEnabledFor(logging.DEBUG):
|
||||
|
|
|
|||
Loading…
Reference in a new issue