Skip to content

Commit 43b560c

Browse files
committed
cleanup
1 parent df29847 commit 43b560c

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

server/mergin/sync/files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,20 +212,20 @@ def validate(self, data, **kwargs):
212212

213213
if not is_valid_path(file_path):
214214
raise ValidationError(
215-
f"Unsupported file name detected: {file_path}. Please remove the invalid characters."
215+
f"Unsupported file name detected: '{file_path}'. Please remove the invalid characters."
216216
)
217217

218218
if not is_supported_extension(file_path):
219219
raise ValidationError(
220-
f"Unsupported file type detected: {file_path}. "
220+
f"Unsupported file type detected: '{file_path}'. "
221221
f"Please remove the file or try compressing it into a ZIP file before uploading.",
222222
)
223223
# new checks must restrict only new files not to block existing projects
224224
for file in data["added"]:
225225
file_path = file["path"]
226226
if has_trailing_space(file_path):
227227
raise ValidationError(
228-
f"Folder name contains a trailing space. Please remove the space in: {file_path}"
228+
f"Folder name contains a trailing space. Please remove the space in: '{file_path}'."
229229
)
230230

231231

server/mergin/sync/utils.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ def is_qgis(path: str) -> bool:
101101
return ext.lower() in [".qgs", ".qgz"]
102102

103103

104-
def int_version(version):
105-
"""Convert v<n> format of version to integer representation."""
106-
return int(version.lstrip("v")) if re.match(r"v\d", version) else None
107-
108-
109104
def is_versioned_file(file):
110105
"""Check if file is compatible with geodiff lib and hence suitable for versioning."""
111106
diff_extensions = [".gpkg", ".sqlite"]

0 commit comments

Comments
 (0)