Add flag to ignore check folder modtime for rclone snapshot

This commit is contained in:
jnwan
2025-07-24 21:34:17 -07:00
parent 0cce97f373
commit e350122125
3 changed files with 7 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ class StorageBase(metaclass=ABCMeta):
"""
schema = None
transtype = {}
snapshot_check_folder_modtime = True
def __init__(self):
self.storagehelper = StorageHelper()
@@ -214,7 +215,8 @@ class StorageBase(metaclass=ABCMeta):
return
# 增量检查:如果目录修改时间早于上次快照,跳过
if (last_snapshot_time and
if (self.snapshot_check_folder_modtime and
last_snapshot_time and
_fileitm.modify_time and
_fileitm.modify_time <= last_snapshot_time):
return

View File

@@ -26,6 +26,8 @@ class Rclone(StorageBase):
"copy": "复制"
}
snapshot_check_folder_modtime = settings.RCLONE_SNAPSHOT_CHECK_FOLDER_MODTIME
def init_storage(self):
"""
初始化