We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15cec1e commit 931f548Copy full SHA for 931f548
1 file changed
server/mergin/sync/tasks.py
@@ -102,6 +102,12 @@ def optimize_storage(project_id):
102
if not os.path.exists(item.abs_path):
103
continue
104
105
+ # skip cleanup if missing corresponding diff file - this should never happen but in case of some inconsistency keep full gpkg on disk
106
+ if not os.path.exists(
107
+ os.path.join(project.storage.project_dir, item.diff_file.location)
108
+ ):
109
+ continue
110
+
111
age = time.time() - os.path.getmtime(item.abs_path)
112
if age > Configuration.FILE_EXPIRATION:
113
move_to_tmp(item.abs_path)
0 commit comments