Merge pull request #636 from Jan2go/master

Allow project roots that are relative to the project file's location
This commit is contained in:
Daniel Marjamäki 2015-08-11 14:31:14 +02:00
commit 7368daa14a
1 changed files with 2 additions and 0 deletions

View File

@ -1113,6 +1113,8 @@ void MainWindow::CheckProject(Project *project)
// file's location directory as root path // file's location directory as root path
if (rootpath.isEmpty() || rootpath == ".") if (rootpath.isEmpty() || rootpath == ".")
mCurrentDirectory = inf.canonicalPath(); mCurrentDirectory = inf.canonicalPath();
else if (rootpath.startsWith("."))
mCurrentDirectory = inf.canonicalPath() + rootpath.mid(1);
else else
mCurrentDirectory = rootpath; mCurrentDirectory = rootpath;