-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delimitedtext layer saves absolute path when project in relative path mode #28968
Comments
Author Name: Giovanni Manghi (@gioman) confirmed and if I'm not wrong this is a regression.
|
Author Name: Alessandro Pasotti (@elpaso)
|
Author Name: Adam Liddell (@aaliddell) I've tested on 3.6.0, which contains the above patch, and the issue is still present when following the original steps to reproduce.
|
Author Name: Alessandro Pasotti (@elpaso) I cannot reproduce the bug, I explain it better: What you originally filed was a bug because the csv path was not set as relative in the tag named "datasource" that is the real path of the data source, and that bug is now fixed: I cannot reproduce it after the patch and it is proteced by a test case which is not failing. Btw, there is another place where the path is stored and you correctly mentioned it as 'layer-tree-layer', that value is never used inside QGIS (I honestly dont' know what is its purpose). Did you really try to move the project in another folder (with its relative data) and reproduce the issue or did you just check for 'layer-tree-layer' 'source' value? I'm pretty sure that the behavior that you described in the ticket is now fixed, it is not fixed the 'layer-tree-layer' 'source' path because it did not produce any effect. Can you please confirm?
|
Author Name: Adam Liddell (@aaliddell) Yes, the absolute path is only appearing in the layer-tree-layer source value now. I wasn't aware that the field was not used within QGIS, hence the reopening when I noticed it was still there. |
Author Name: Alessandro Pasotti (@elpaso) In any event I'm going to fix 'layer-tree-layer' + 'source' too, to avoid any confusion. The reason why it only affected CSV (well, more precisely, the reason why does not affect shapefiles) is that the CSV uri is internally stored like this: 'file:///home/Maps/test_set/DHH_facilities.csv?type=csv&detectTypes=yes&xField=Longitude&yField=Latitude&crs=EPSG:4326&spatialIndex=no&subsetIndex=no&watchFile=no' while shapefile is stored like this: 'file:///home/Maps/test_set/DHH_facilities.shp' the extra URL-like stuff was making the check for file existence to fail. |
Author Name: Adam Liddell (@aaliddell) Ok, that makes sense, thank you |
Author Name: Alessandro Pasotti (@elpaso)
|
Author Name: Adam Liddell (@aaliddell)
Original Redmine Issue: 21150
Affected QGIS version: 3.4.4
Redmine category:project_loading/saving
Assignee: Alessandro Pasotti
When saving a project with 'Save paths' set to 'relative', the paths for any delimited text layers are saved as absolute 'file:///...' paths in the project file.
Steps to reproduce:
Expected behaviour:
When in relative paths mode, the delimited text layer should save its source as a relative path
This breaks being able to produce shareable projects.
Manually rewriting the paths to be relative (e.g. file://../data/file.csv) still works when reloading the project, but on the next save they will be overwritten with absolute paths again.
The text was updated successfully, but these errors were encountered: