Skip to content

Commit

Permalink
Fix loading of storage projects from command line
Browse files Browse the repository at this point in the history
Fix #47270
  • Loading branch information
elpaso authored and nyalldawson committed Feb 9, 2022
1 parent 4171ec9 commit 046fcd6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,16 @@ int main( int argc, char *argv[] )
}
else if ( i + 1 < argc && ( arg == QLatin1String( "--project" ) || arg == QLatin1String( "-p" ) ) )
{
sProjectFileName = QDir::toNativeSeparators( QFileInfo( args[++i] ).absoluteFilePath() );
const QString projectUri { args[++i] };
const QFileInfo projectFileInfo { projectUri };
if ( projectFileInfo.isFile() )
{
sProjectFileName = QDir::toNativeSeparators( projectFileInfo.absoluteFilePath() );
}
else
{
sProjectFileName = projectUri;
}
}
else if ( i + 1 < argc && ( arg == QLatin1String( "--extent" ) || arg == QLatin1String( "-e" ) ) )
{
Expand Down

0 comments on commit 046fcd6

Please sign in to comment.