Skip to content

Commit

Permalink
Make Windows storage_dir match directories
Browse files Browse the repository at this point in the history
It was wrong in the documentation as well.
  • Loading branch information
YgorSouza committed Aug 7, 2024
1 parent 2d745ad commit 8f47322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/eframe/src/native/file_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::{
/// which is:
/// * Linux: `/home/UserName/.local/share/APP_ID`
/// * macOS: `/Users/UserName/Library/Application Support/APP_ID`
/// * Windows: `C:\Users\UserName\AppData\Roaming\APP_ID`
/// * Windows: `C:\Users\UserName\AppData\Roaming\APP_ID\data`
///
/// If the `directories` feature is not enabled, it uses a naive approximation that returns the
/// same result for the most common systems.
Expand Down Expand Up @@ -59,7 +59,7 @@ fn naive_storage_dir(app_id: &str) -> Option<PathBuf> {
.join("Application Support")
.join(app_id.replace(|c: char| c.is_ascii_whitespace(), "-"))
}),
OS::Windows => var_os("APPDATA").map(|s| PathBuf::from(s).join(app_id)),
OS::Windows => var_os("APPDATA").map(|s| PathBuf::from(s).join(app_id).join("data")),
OS::Unknown | OS::Android | OS::IOS => None,
}
}
Expand Down

0 comments on commit 8f47322

Please sign in to comment.