-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use app_local_data_dir() for database #757
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I just tested it, seems to be working fine, and the race condition is EXTREMELY unlikely. I have no opinion between I don't really like that Tauri uses the bundle identifier as the path for configs/data, that's not as readable/findable as using the app name. I may change this behavior at some point, but let's stop using the home dir at least (though it's really convenient). |
*/ | ||
// TODO: Replace with PathResolver::app_config_dir(). | ||
fn get_app_storage_dir() -> PathBuf { | ||
let path = dirs::home_dir().expect("Get home dir"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, how about using dirs::config_dir();
? + museeks
as folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directories
would be more appropriate than the the low-level dirs
crate.
But since this is supposed to be a temporary hack anything that respects the established standards on each platform is better than polluting the home directory.
* Use app_local_data_dir() for database * Move get_app_storage_dir() into config
No description provided.