Skip to content

Commit 8f47322

Browse files
committed
Make Windows storage_dir match directories
It was wrong in the documentation as well.
1 parent 2d745ad commit 8f47322

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/eframe/src/native/file_storage.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::{
1515
/// which is:
1616
/// * Linux: `/home/UserName/.local/share/APP_ID`
1717
/// * macOS: `/Users/UserName/Library/Application Support/APP_ID`
18-
/// * Windows: `C:\Users\UserName\AppData\Roaming\APP_ID`
18+
/// * Windows: `C:\Users\UserName\AppData\Roaming\APP_ID\data`
1919
///
2020
/// If the `directories` feature is not enabled, it uses a naive approximation that returns the
2121
/// same result for the most common systems.
@@ -59,7 +59,7 @@ fn naive_storage_dir(app_id: &str) -> Option<PathBuf> {
5959
.join("Application Support")
6060
.join(app_id.replace(|c: char| c.is_ascii_whitespace(), "-"))
6161
}),
62-
OS::Windows => var_os("APPDATA").map(|s| PathBuf::from(s).join(app_id)),
62+
OS::Windows => var_os("APPDATA").map(|s| PathBuf::from(s).join(app_id).join("data")),
6363
OS::Unknown | OS::Android | OS::IOS => None,
6464
}
6565
}

0 commit comments

Comments
 (0)