Skip to content

Commit

Permalink
Fixed samples path on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Feb 17, 2023
1 parent bd98c1a commit 647501b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/FileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,18 +288,18 @@ void showCopyingSessionFailedMessage(QWidget *parent)
QDir getInstallDirectory(const QString &dirName)
{
const auto paths = std::initializer_list<QString>{
QCoreApplication::applicationDirPath() + "/",
QCoreApplication::applicationDirPath(),
#if !defined(NDEBUG)
QCoreApplication::applicationDirPath() + "/../",
QCoreApplication::applicationDirPath() + "/../../",
QCoreApplication::applicationDirPath() + "/..",
QCoreApplication::applicationDirPath() + "/../..",
#endif
#if defined(__linux__)
qEnvironmentVariable("APPDIR") + "/usr/share/" +
QCoreApplication::organizationName(),
#endif
};
for (const auto &path : paths) {
auto dir = QDir(path + dirName);
auto dir = QDir(path + "/" + dirName);
if (dir.exists())
return dir;
}
Expand Down

0 comments on commit 647501b

Please sign in to comment.