Bug report #1905

Relative/Absolute paths are not recalculated on project save

Added by Maxim Dubinin about 11 years ago. Updated about 11 years ago.

Status:Closed
Priority:Low
Assignee:Jürgen Fischer
Category:Project Loading/Saving
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11965

Description

Part 1
1. Create new project with a shapefile
2. Clear the checkbox to save relative paths, resave the project
3. Check paths - they are relative, fine
4. Resave the project one folder up.
5. Check paths - they did not change, but they should have.

History

#1 Updated by Giovanni Manghi about 11 years ago

Under Linux I can replicate the problem, but only if the project is saved in a directory in a level under (not above, as described) the one where the data reside (assuming that all the layers files are in the same folder). I'll make further tests.

#2 Updated by Giovanni Manghi about 11 years ago

I tested the behaviour also under windows (qgis-dev from osgeo4w) and the result seems the same to me. When I save a project (after clearing the checkbox to save relative paths) the path to a layer in the .qgs file is relative if the project file resides in a folder that stays at the same level or above the one of the layer. If the project file resides in a folder below the one of the layer, then the path is absolute.

So, if you have layers coming from different folders, and depending where you save the project, you may have correct relative paths, incorrect absolute ones and even a project file with a mix of relative and absolute paths.

#3 Updated by Jürgen Fischer about 11 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

fixed in ddd64be8 (SVN r11572)

Also available in: Atom PDF