Fix sync loop for too long path - #316
Conversation
Coverage Report for CI Build 34469353898Coverage decreased (-0.02%) to 83.371%Details
Uncovered Changes
Coverage Regressions3 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
| prefix = backslash + backslash + "?" + backslash | ||
| if path.startswith(prefix): | ||
| return path | ||
| return prefix + os.path.abspath(path) |
There was a problem hiding this comment.
So this is only for local handling of files but it will never end up in relative paths for files in DB (we need this to work for all clients)?
There was a problem hiding this comment.
yes, rel_path() handles the prefixed path correctly and removes it
| diffs = [] | ||
| for v in versions_to_fetch[1:]: | ||
| diffs.append(mp.fpath_cache(file_history["history"][v]["diff"]["path"], v)) | ||
| diffs.append(long_path(mp.fpath_cache(file_history["history"][v]["diff"]["path"], v))) |
There was a problem hiding this comment.
Using some patch function for a lot of os.paths hanging around in the code seems fragile to me. It can easily slip and we might forgot to use in future. I think we need to come up with some generic handler, single place which will make sure all paths are correct in whole code base.
|
Let's try to use |
|
PR history: Debugging info: Push treats every gpkg with editing mode enabled as well as with original vs. current gpkg checksum mismatch (which is quite common) as potentially updated, and we rely on geodiff to calculate the real changes. Geodiff creates an empty diff file even when there is no change.
|

Fixes MerginMaps/qgis-plugin#932
This adds an extended-path prefix to all Python filesystem operations on Windows so that it can work with files&folder > 260 characters. The prefix is not in the responses and won't reach the server DB.