Skip to content

Commit

Permalink
Check file existance in QgsFileWidget - Fixes #46077
Browse files Browse the repository at this point in the history
  • Loading branch information
Djedouas authored and github-actions[bot] committed Dec 20, 2021
1 parent c1dc549 commit a3b4f5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgsfilewidget.cpp
Expand Up @@ -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 );
}
Expand Down

0 comments on commit a3b4f5c

Please sign in to comment.