Exit if appDirPath == "/", closes #144
This commit is contained in:
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
|
|||||||
if (QDir().exists(appBinaryPath)) {
|
if (QDir().exists(appBinaryPath)) {
|
||||||
qDebug() << "app-binary:" << appBinaryPath;
|
qDebug() << "app-binary:" << appBinaryPath;
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Error: Could not find app-binary" << appBinaryPath;
|
LogError() << "Error: Could not find app-binary" << appBinaryPath;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,6 +199,11 @@ int main(int argc, char **argv)
|
|||||||
QString relativePrefix = fhsPrefix.replace(appDirPath+"/", "");
|
QString relativePrefix = fhsPrefix.replace(appDirPath+"/", "");
|
||||||
relativeBinPath = relativePrefix + "/bin/" + appName;
|
relativeBinPath = relativePrefix + "/bin/" + appName;
|
||||||
}
|
}
|
||||||
|
if(appDirPath == "/"){
|
||||||
|
LogError() << "'/' is not a valid AppDir. Please refer to the documentation.";
|
||||||
|
LogError() << "Consider adding INSTALL_ROOT or DESTDIR to your install steps.";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
qDebug() << "appDirPath:" << appDirPath;
|
qDebug() << "appDirPath:" << appDirPath;
|
||||||
qDebug() << "relativeBinPath:" << relativeBinPath;
|
qDebug() << "relativeBinPath:" << relativeBinPath;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user