Bug report #17116
QGIS master saves always with absolute paths
|Affected QGIS version:||master||Regression?:||Yes|
|Operating System:||Xubuntu 17.04||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||25015|
This issue was addressed only in 2.18 to date. Master 313ec55 (January 2017) and 655f121 (September 2017) on Linux both produce the problem. 1182816 (January 2017) on Windows does not.
Attached new project created in latest available build 655f121.
<layer-tree-layer source="/mnt/share/mainpc/maps/Google Drive/NZ Rail Maps/Projects/CanterburyWestlandNelsonMarlborough/Main/cwmnNelsonSection.shp" expanded="1" name="cwmnNelsonSection" checked="Qt::Checked" id="cwmnNelsonSection_2225c913_8062_4cd1_817e_73ffeb6cec35" providerKey="ogr">
should read something like "./Main/cwmnNelsonSection.shp" given the shapefile is in a subdirectory below the location of the project file. If I open that project file in Windows it will obviously fail with the different network mapping (to a drive letter).
so project properties are set to relative file paths.
This sounds exactly like the description of #16242 given it only happens at new project creation or saving an existing project under a new name. In the course of using various masters on different platforms (for example, using both Windows and Linux to work on the same project file on the same day) interchanging existing projects between Windows and Linux platforms have not actually shown up this problem before. Until yesterday when I saved a project under a new name on 313ec55 and tried to open it in Windows, could not load a single layer in the Windows vm.
#4 Updated by magerlin - almost 2 years ago
Qgis 2.18.15 also has this issue: Creating a new project completely from scratch (with project options set to relative paths), saving the project in c:\@temp and then adding a shp file from the same folder as the project is stored in adds this to the project file:
<layer-tree-layer expanded="1" providerKey="ogr" checked="Qt::Checked" id="2stat_befolk20171230182502788" source="C:\@Temp\2stat_befolk.shp" name="2stat_befolk">
I am using Win 7, 64 bit, QGIS code revision ac2d111ed1