Skip to content

Commit

Permalink
Fix QgsMapLayer::saveNamedProperty and QgsMapLayer::saveSldStyleV2
Browse files Browse the repository at this point in the history
set resultFlag to False when the directory is not writable
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Sep 15, 2023
1 parent 63d91e2 commit 8bc9901
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsmaplayer.cpp
Expand Up @@ -1392,6 +1392,7 @@ QString QgsMapLayer::saveNamedProperty( const QString &uri, QgsMapLayer::Propert
const QFileInfo myDirInfo( myFileInfo.path() ); //excludes file name
if ( !myDirInfo.isWritable() )
{
resultFlag = false;
return tr( "The directory containing your dataset needs to be writable!" );
}

Expand Down Expand Up @@ -1698,6 +1699,7 @@ QString QgsMapLayer::saveSldStyle( const QString &uri, bool &resultFlag ) const
const QFileInfo myDirInfo( myFileInfo.path() ); //excludes file name
if ( !myDirInfo.isWritable() )
{
resultFlag = false;
return tr( "The directory containing your dataset needs to be writable!" );
}

Expand Down

0 comments on commit 8bc9901

Please sign in to comment.