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)

(cherry picked from commit 59282b0)
  • Loading branch information
alexbruy authored and nyalldawson committed May 26, 2020
1 parent a0134e1 commit ddd8b7dbcc3e730c92b0ac0906271b2c730b48f1
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::QGIS_VERSION ) );

0 comments on commit ddd8b7d

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