diff options
author | rabite <rabite@posteo.de> | 2019-05-08 14:06:10 +0200 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-05-21 20:57:01 +0200 |
commit | 8a997042d34a8efea9f983d9677917665ebfcf46 (patch) | |
tree | bfb9c9290a83fcf55824c0003eebe34830f7e8f4 /src/paths.rs | |
parent | e8d9c6ad1f82d6b0bbf3cf9449ce53dd525cb77a (diff) |
testing conditional compilation
Diffstat (limited to 'src/paths.rs')
-rw-r--r-- | src/paths.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/paths.rs b/src/paths.rs index 8774597..68c6376 100644 --- a/src/paths.rs +++ b/src/paths.rs @@ -15,12 +15,23 @@ pub fn ranger_path() -> HResult<PathBuf> { Ok(ranger_path) } +#[cfg(not(target_os = "macos"))] pub fn hunter_path() -> HResult<PathBuf> { let mut hunter_path = dirs_2::config_dir()?; hunter_path.push("hunter/"); Ok(hunter_path) } +#[cfg(target_os = "macos")] +pub fn hunter_path() -> HResult<PathBuf> { + dbg!("Finding path for macOS"); + let mut hunter_path = home_path()?; + hunter_path.push(".config/"); + hunter_path.push("hunter/"); + dbg!(&hunter_path); + Ok(hunter_path) +} + pub fn config_path() -> HResult<PathBuf> { let mut config_path = hunter_path()?; config_path.push("config"); |