From 6b45be6c94bef71bfac650694beba2e824be818b Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 6 Mar 2018 22:50:16 +0100 Subject: [PATCH] GUI: Avoid path concatenation when path is absolute (#1103) When using an absolute path for import project, prepending the current directory results in an invalid path and the analysis (silently, no error shown in the GUI) fails. --- gui/mainwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 93123dd04..27b1b66dd 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1462,7 +1462,14 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile) if (!projectFile->getImportProject().isEmpty()) { ImportProject p; - QString prjfile = inf.canonicalPath() + '/' + projectFile->getImportProject(); + QString prjfile; + + if(QFileInfo(projectFile->getImportProject()).isAbsolute()) { + prjfile = projectFile->getImportProject(); + } + else { + prjfile = inf.canonicalPath() + '/' + projectFile->getImportProject(); + } try { p.import(prjfile.toStdString()); } catch (InternalError &e) {