Skip to content
Permalink
Browse files
Check file existance in QgsFileWidget - Fixes #46077
  • Loading branch information
Djedouas authored and github-actions committed Dec 20, 2021
1 parent c1dc549 commit a3b4f5cc0ef20e24eb610e156f5021c78c8d7386
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 a3b4f5c

Please sign in to comment.