[libcalamares] Simplify returns in targetPath()

This commit is contained in:
Adriaan de Groot 2020-02-07 11:03:40 +01:00
parent 72d742e2f4
commit 9ef04192db

View File

@ -266,8 +266,6 @@ System::runCommand( System::RunLocation location,
QString QString
System::targetPath( const QString& path ) const System::targetPath( const QString& path ) const
{ {
QString completePath;
if ( doChroot() ) if ( doChroot() )
{ {
Calamares::GlobalStorage* gs Calamares::GlobalStorage* gs
@ -279,14 +277,12 @@ System::targetPath( const QString& path ) const
return QString(); return QString();
} }
completePath = gs->value( "rootMountPoint" ).toString() + '/' + path; return gs->value( "rootMountPoint" ).toString() + '/' + path;
} }
else else
{ {
completePath = QStringLiteral( "/" ) + path; return QStringLiteral( "/" ) + path;
} }
return completePath;
} }
QString QString