Skip to content
Permalink
Browse files
Check file existance in QgsFileWidget - Fixes #46077
  • Loading branch information
Djedouas authored and nyalldawson committed Dec 20, 2021
1 parent 6c93b2a commit 78a4ed445da4ef0cde169b5012d9894da0b50054
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/qgsfilewidget.cpp
@@ -281,7 +281,7 @@ void QgsFileWidget::openFileDialog()

// if we use a relative path option, we need to obtain the full path
// first choice is the current file path, if one is entered
if ( !mFilePath.isEmpty() )
if ( !mFilePath.isEmpty() && QFile( mFilePath ).exists() )
{
oldPath = relativePath( mFilePath, false );
}

0 comments on commit 78a4ed4

Please sign in to comment.