Skip to content

Commit 8bc9901

Browse files
agiudiceandreanyalldawson
authored andcommittedSep 15, 2023
Fix QgsMapLayer::saveNamedProperty and QgsMapLayer::saveSldStyleV2
set resultFlag to False when the directory is not writable
1 parent 63d91e2 commit 8bc9901

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/core/qgsmaplayer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,7 @@ QString QgsMapLayer::saveNamedProperty( const QString &uri, QgsMapLayer::Propert
13921392
const QFileInfo myDirInfo( myFileInfo.path() ); //excludes file name
13931393
if ( !myDirInfo.isWritable() )
13941394
{
1395+
resultFlag = false;
13951396
return tr( "The directory containing your dataset needs to be writable!" );
13961397
}
13971398

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

0 commit comments

Comments
 (0)
Please sign in to comment.