Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
May 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/app/qgscrashhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) );
Expand Down