From c583f94ef094d0e6409e5b90a0c5df767629b8f7 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 31 Mar 2021 19:51:19 +0200 Subject: [PATCH] Correct the documentation of where app state is saved Replaces https://github.com/emilk/egui/pull/263 --- epi/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/epi/src/lib.rs b/epi/src/lib.rs index 70d2e890..6c508773 100644 --- a/epi/src/lib.rs +++ b/epi/src/lib.rs @@ -89,10 +89,12 @@ pub trait App { /// Called on shutdown, and perhaps at regular intervals. Allows you to save state. /// /// On web the states is stored to "Local Storage". - /// On native the path is picked using [`directories_next::ProjectDirs`](https://docs.rs/directories-next/latest/directories_next/struct.ProjectDirs.html) which is: - /// * Linux: `/home/UserName/.config/appname` - /// * macOS: `/Users/UserName/Library/Application Support/appname` - /// * Windows: `C:\Users\UserName\AppData\Roaming\appname` + /// On native the path is picked using [`directories_next::ProjectDirs::data_dir`](https://docs.rs/directories-next/2.0.0/directories_next/struct.ProjectDirs.html#method.data_dir) which is: + /// * Linux: `/home/UserName/.local/share/APPNAME` + /// * macOS: `/Users/UserName/Library/Application Support/APPNAME` + /// * Windows: `C:\Users\UserName\AppData\Roaming\APPNAME` + /// + /// where `APPNAME` is what is returned by [`Self::name()`]. fn save(&mut self, _storage: &mut dyn Storage) {} /// Called once on shutdown (before or after `save()`)