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:
parent
a2a93ff04b
commit
39d7ae5f3a
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user