From 9ef04192dbc621dbc2864c856d12b94eb139d4ce Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 7 Feb 2020 11:03:40 +0100 Subject: [PATCH] [libcalamares] Simplify returns in targetPath() --- src/libcalamares/utils/CalamaresUtilsSystem.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index ea8f507bd..5d4b61a2f 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -266,8 +266,6 @@ System::runCommand( System::RunLocation location, QString System::targetPath( const QString& path ) const { - QString completePath; - if ( doChroot() ) { Calamares::GlobalStorage* gs @@ -279,14 +277,12 @@ System::targetPath( const QString& path ) const return QString(); } - completePath = gs->value( "rootMountPoint" ).toString() + '/' + path; + return gs->value( "rootMountPoint" ).toString() + '/' + path; } else { - completePath = QStringLiteral( "/" ) + path; + return QStringLiteral( "/" ) + path; } - - return completePath; } QString