171: Use correct default data directory r=da-kami a=da-kami

Nasty copy-paster 😬

Co-authored-by: Daniel Karzel <daniel@comit.network>
This commit is contained in:
bors[bot] 2021-02-04 01:42:16 +00:00 committed by GitHub
commit f0bf294689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,10 +16,10 @@ pub fn default_config_path() -> anyhow::Result<PathBuf> {
} }
/// This is to store the DB /// This is to store the DB
// Linux: /home/<user>/.local/share/nectar/ // Linux: /home/<user>/.local/share/xmr-btc-swap/
// OSX: /Users/<user>/Library/Application Support/nectar/ // OSX: /Users/<user>/Library/Application Support/xmr-btc-swap/
pub fn default_data_dir() -> Option<std::path::PathBuf> { pub fn default_data_dir() -> Option<std::path::PathBuf> {
ProjectDirs::from("", "", "nectar").map(|proj_dirs| proj_dirs.data_dir().to_path_buf()) ProjectDirs::from("", "", "xmr-btc-swap").map(|proj_dirs| proj_dirs.data_dir().to_path_buf())
} }
pub fn ensure_directory_exists(file: &Path) -> Result<(), std::io::Error> { pub fn ensure_directory_exists(file: &Path) -> Result<(), std::io::Error> {