Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
161f018cb9 | ||
|
565c1d31b9 |
@ -7,7 +7,7 @@ Suppose you have a third party backup program regularly dropping backup files in
|
|||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
Copyright 2023 Mike Peralta; All rights reserved
|
Copyright 2024 Mike Peralta; All rights reserved
|
||||||
|
|
||||||
Releasing to the public under the GNU GENERAL PUBLIC LICENSE v3 (See LICENSE file for more)
|
Releasing to the public under the GNU GENERAL PUBLIC LICENSE v3 (See LICENSE file for more)
|
||||||
|
|
||||||
|
@ -326,7 +326,12 @@ class BackupRotator:
|
|||||||
best_ctime = None
|
best_ctime = None
|
||||||
for item in items:
|
for item in items:
|
||||||
|
|
||||||
|
try:
|
||||||
ctime = Util.detect_item_creation_date(config, item)
|
ctime = Util.detect_item_creation_date(config, item)
|
||||||
|
except FileNotFoundError as e:
|
||||||
|
self.__logger.error(f"File disappeared while trying to check ctime: {item}")
|
||||||
|
continue
|
||||||
|
|
||||||
if best_ctime is None or ctime < best_ctime:
|
if best_ctime is None or ctime < best_ctime:
|
||||||
best_ctime = ctime
|
best_ctime = ctime
|
||||||
best_item = item
|
best_item = item
|
||||||
|
@ -42,6 +42,8 @@ class Util:
|
|||||||
# print("got mtime")
|
# print("got mtime")
|
||||||
stat = item.stat().st_birthtime
|
stat = item.stat().st_birthtime
|
||||||
# print("got btime")
|
# print("got btime")
|
||||||
|
except FileNotFoundError as e:
|
||||||
|
raise e
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user