Bug report #9940

Save to File from Print Layout silently fails when file is open in another application.

Added by Alex Leith over 10 years ago. Updated over 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:18444

Description

The issue is that you go 'save to PDF' and it works away, and seems to work, but if the file is open in another application it silently fails.

What needs to happen is like this (in Python code):

fExists = os.access(outFile, os.F_OK)
fAccess = os.access(outFile, os.X_OK)
if(fExists and not fAccess):
QMessageBox.information(None, "Error", 'Can\\'t write file as it\\'s open in another program. Please close the file or choose a different target.')
return

History

#1 Updated by Nyall Dawson over 10 years ago

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

Duplicate of #9283

Also available in: Atom PDF