diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-04-17 11:08:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-17 11:08:14 -0400 |
| commit | c47ab23f9593d384a1b5106f79d41228fc8c8f59 (patch) | |
| tree | 6266ae6c032610d681dc7b83d74fa00ba1e0feeb /src | |
| parent | 855650215f5011082f6a3fa4dcfb69b040367911 (diff) | |
| parent | 2c1331e3e5252f38bcff656c7a3b0e4fe26fcb8d (diff) | |
Merge pull request #1055 from isanae/sysdir-opt
Fix for getOptionalKnownFolder()
Diffstat (limited to 'src')
| -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 += "\\"; } |
