Opened 15 years ago

Closed 15 years ago

#1905 closed bug (fixed)

Relative/Absolute paths are not recalculated on project save

Reported by: gislab Owned by: jef
Priority: major: does not work as expected Milestone: Version 1.3.0
Component: Project Loading / Saving Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

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.

Change History (4)

comment:1 by lutra, 15 years ago

Platform: WindowsAll

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.

comment:2 by lutra, 15 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.

comment:3 by jef, 15 years ago

Owner: changed from nobody to jef

comment:4 by jef, 15 years ago

Resolution: fixed
Status: newclosed

fixed in r11571

Note: See TracTickets for help on using tickets.