android write rust log to ExternalStorage/RustDesk/Logs

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-10-17 18:49:34 +08:00
parent 63591941b8
commit 2e829956f4
2 changed files with 20 additions and 4 deletions

View File

@@ -341,8 +341,8 @@ impl Default for PeerConfig {
view_only: Default::default(),
reverse_mouse_wheel: Self::default_reverse_mouse_wheel(),
displays_as_individual_windows: Self::default_displays_as_individual_windows(),
use_all_my_displays_for_the_remote_session: Self::default_use_all_my_displays_for_the_remote_session(
),
use_all_my_displays_for_the_remote_session:
Self::default_use_all_my_displays_for_the_remote_session(),
custom_resolutions: Default::default(),
options: Self::default_options(),
ui_flutter: Default::default(),
@@ -623,6 +623,13 @@ impl Config {
std::fs::create_dir_all(&path).ok();
return path;
}
#[cfg(target_os = "android")]
{
let mut path = Self::get_home();
path.push(format!("{}/Logs", *APP_NAME.read().unwrap()));
std::fs::create_dir_all(&path).ok();
return path;
}
if let Some(path) = Self::path("").parent() {
let mut path: PathBuf = path.into();
path.push("log");