Use QDir::currentPath to get the current directory

applicationDirPath() does not find the source directory (if build
directory differs from source directory). Using currentPath() allows one
to still run built Subsurface from the source directory and find e.g.
xslt_path.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2013-10-13 18:43:13 +03:00 committed by Dirk Hohndel
parent a2a93ff04b
commit 39d7ae5f3a

View file

@ -390,7 +390,7 @@ QString getSubsurfaceDataPath(QString folderToFind)
// first check if we are running in the build dir, so this
// is just subdirectory of the current directory
execdir = QCoreApplication::applicationDirPath();
execdir = QDir::currentPath();
folder = QDir(execdir.append(QDir::separator()).append(folderToFind));
if (folder.exists())
return folder.absolutePath();