File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333# Maximum changes uploading to server
3434MAX_UPLOAD_CHANGES = 100
3535
36- # maximum length of a path supported by Windows without long paths enabled (MAX_PATH)
37- WINDOWS_MAX_PATH = 260
38-
3936# default URL for submitting logs
4037MERGIN_DEFAULT_LOGS_URL = "https://g4pfq226j0.execute-api.eu-west-1.amazonaws.com/mergin_client_log_submit"
4138
Original file line number Diff line number Diff line change 99import tempfile
1010from enum import Enum
1111from typing import Optional , Type , Union , ByteString
12- from .common import ClientError , WINDOWS_MAX_PATH
12+ from .common import ClientError
1313
1414
1515def generate_checksum (file , chunk_size = 4096 ):
@@ -267,23 +267,10 @@ def is_versioned_file(path: str) -> bool:
267267 return f_extension .lower () in diff_extensions
268268
269269
270- def is_path_too_long (path : str ) -> bool :
271- """
272- Check whether an absolute path is too long to be reliably created/opened on this OS.
273-
274- :param path: absolute path to check
275- :type path: str
276- :returns: whether the path is likely to be rejected by the OS
277- :rtype: bool
278- """
279- return os .name == "nt" and len (path ) >= WINDOWS_MAX_PATH
280-
281-
282270def long_path (path : str ) -> str :
283271 """
284- Prefix an absolute path with the Windows "\\ ?\" extended-length marker,
285- so file APIs used by geodiff/SQLite and Python's own open() can handle paths longer
286- than MAX_PATH (260 characters) without raising an error.
272+ Prefix an absolute path with the Windows "\\ ?\" extended-length marker, so file APIs used by
273+ geodiff/SQLite and Python's own open() can handle long paths without raising an error.
287274
288275 :param path: absolute or relative path, with either posix or windows separators
289276 :type path: str
You can’t perform that action at this time.
0 commit comments