mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-09 20:10:37 -04:00
Add support for changing save location on Android (#1520)
- Enabled the Android UI path for changing the data folder - Added Android MANAGE_EXTERNAL_STORAGE permission - Added an Android flow to request “All files access” before opening the folder picker - Added code path to resume the folder selection flow after returning from Android settings - Improved the Android write-probe error message to point users at the required permission
This commit is contained in:
@@ -525,7 +525,14 @@ bool validate_writable_data_path(const std::filesystem::path& path, std::string*
|
||||
try {
|
||||
io::FileStream::WriteAllText(probePath, "dusk");
|
||||
} catch (const std::exception& e) {
|
||||
#if defined(__ANDROID__)
|
||||
set_error(errorOut,
|
||||
fmt::format("{} could not write to the selected folder. On Android, allow "
|
||||
"\"All files access\" for Dusklight and try again.",
|
||||
AppName));
|
||||
#else
|
||||
set_error(errorOut, fmt::format("{} could not write to the selected folder.", AppName));
|
||||
#endif
|
||||
Log.warn("Failed write probe for custom data folder '{}': {}", io::fs_path_to_string(path),
|
||||
e.what());
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user