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:
Gina Häußge 2017-10-10 12:51:43 +02:00
parent abfcc6e5aa
commit d1fdbd5080

View file

@ -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):