summaryrefslogtreecommitdiff
path: root/src/sanitychecks.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-04-17 11:06:08 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2020-04-17 11:06:08 -0400
commit2c1331e3e5252f38bcff656c7a3b0e4fe26fcb8d (patch)
tree6266ae6c032610d681dc7b83d74fa00ba1e0feeb /src/sanitychecks.cpp
parent855650215f5011082f6a3fa4dcfb69b040367911 (diff)
getOptionalKnownFolder() returns a string now
Diffstat (limited to 'src/sanitychecks.cpp')
-rw-r--r--src/sanitychecks.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sanitychecks.cpp b/src/sanitychecks.cpp
index 5ccd7699..3794aa57 100644
--- a/src/sanitychecks.cpp
+++ b/src/sanitychecks.cpp
@@ -320,8 +320,10 @@ std::vector<std::pair<QString, QString>> getSystemDirectories()
std::vector<std::pair<QString, QString>> systemDirs;
for (auto&& p : systemFolderIDs) {
- if (const auto dir=MOBase::getOptionalKnownFolder(p.first)) {
- auto path = QDir::toNativeSeparators(dir->absolutePath()).toLower();
+ const auto dir = MOBase::getOptionalKnownFolder(p.first);
+
+ if (!dir.isEmpty()) {
+ auto path = QDir::toNativeSeparators(dir).toLower();
if (!path.endsWith("\\")) {
path += "\\";
}