Skip to content
Permalink
Browse files

quote project file path when passing it to the crash handler (fix #25532

)

quote project file path when passing it to the crash handler to avoid
issues if path contains spaces (fix #25532)
  • Loading branch information
alexbruy committed May 26, 2020
1 parent abe8481 commit 59282b0b0f7ef93c5451d02ef3681e7a932289bf
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/app/qgscrashhandler.cpp
@@ -59,7 +59,10 @@ LONG WINAPI QgsCrashHandler::handle( LPEXCEPTION_POINTERS exception )
arguments = QCoreApplication::arguments();
// TODO In future this needs to be moved out into a "session state" file because we can't trust this is valid in
// a crash.
arguments << QgsProject::instance()->fileName();
QString projectFile = QgsProject::instance()->fileName();
if ( !projectFile.isEmpty() )
// quote project file path to avoid issues if it has spaces
arguments << QStringLiteral( "\"%1\"" ).arg( projectFile );

QStringList reportData;
reportData.append( QStringLiteral( "QGIS Version: %1" ).arg( Qgis::version() ) );

0 comments on commit 59282b0

Please sign in to comment.
You can’t perform that action at this time.