Bug report #14811

Loading QLR file locks parent directory forever in Windows

Added by asgerpetersen - about 8 years ago. Updated over 6 years ago.

Affected QGIS version:2.14.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:22767


When loading a QLR file QGIS locks the parent directory. This lock is not released before QGIS is closed.

Imagine a qlr at the path


When this file is loaded you cannot move or rename c:\\test before QGIS has been closed.

This happens both when the QLR is loaded through the menu item "Layer -> Add from layer definition file..." and when the python binding "QgsLayerDefinition.loadLayerDefinition(path, group)" is used.

Affected versions are 2.14, 2.12 and possibly earlier also.


#1 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#2 Updated by Nyall Dawson over 6 years ago

  • Status changed from Open to Feedback
  • Description updated (diff)

This should be fixed with 2.18 - can you confirm?

#3 Updated by Jürgen Fischer over 6 years ago

  • Category set to Unknown

#4 Updated by Mie Winstrup over 6 years ago

Hurray, I have tested with QGIS 2.18.13 and it has been fixed :)

Now, I can add a qlr-file to QGIS and afterwards I'm allowed to change to foldername where the qlr-file is located.

Thanks a lot for the fix.

#5 Updated by Nyall Dawson over 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from Feedback to Closed

Also available in: Atom PDF