Skip to content

Commit 996720e

Browse files
committed
Attempt to read the old config directory too on Android
1 parent 7fcdafa commit 996720e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/backend/Paths.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
#include "AppSettings.h"
2121

22+
#ifdef Q_OS_ANDROID
23+
#include "platform/AndroidHelpers.h"
24+
#endif
25+
2226
#include <QCoreApplication>
2327
#include <QDir>
2428
#include <QFileInfo>
@@ -126,6 +130,15 @@ const QStringList& configDirs()
126130
paths.replaceInStrings(regex, QStringLiteral("/pegasus-frontend"));
127131
}
128132

133+
#ifdef Q_OS_ANDROID
134+
const QStringList all_roots = android::storage_paths();
135+
for (const QString& storage_root : all_roots) {
136+
QString path = storage_root + QStringLiteral("/pegasus-frontend");
137+
if (QFileInfo::exists(path))
138+
paths << std::move(path);
139+
}
140+
#endif
141+
129142
paths.removeDuplicates();
130143
return paths;
131144
}();

0 commit comments

Comments
 (0)