diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-04-17 11:06:08 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-04-17 11:06:08 -0400 |
| commit | 2c1331e3e5252f38bcff656c7a3b0e4fe26fcb8d (patch) | |
| tree | 6266ae6c032610d681dc7b83d74fa00ba1e0feeb | |
| parent | 855650215f5011082f6a3fa4dcfb69b040367911 (diff) | |
getOptionalKnownFolder() returns a string now
| -rw-r--r-- | src/sanitychecks.cpp | 6 |
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 += "\\"; } |
