Skip to content
Permalink
Browse files

avoid 'overwriting' readonly files (fixes #9617)

  • Loading branch information
jef-n committed Feb 22, 2014
1 parent 694e5da commit efc507ac4772071359047049c6c8f0157231e75c
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/app/qgisapp.cpp
@@ -3757,6 +3757,17 @@ bool QgisApp::fileSave()

QgsProject::instance()->setFileName( fullPath.filePath() );
}
else
{
QFileInfo fi( QgsProject::instance()->fileName() );
if ( fi.exists() && ! fi.isWritable() )
{
messageBar()->pushMessage( tr( "Insufficient permissions" ),
tr( "The project file is not writable." ),
QgsMessageBar::WARNING );
return false;
}
}

if ( QgsProject::instance()->write() )
{

0 comments on commit efc507a

Please sign in to comment.
You can’t perform that action at this time.