From 8a997042d34a8efea9f983d9677917665ebfcf46 Mon Sep 17 00:00:00 2001 From: rabite Date: Wed, 8 May 2019 14:06:10 +0200 Subject: testing conditional compilation --- src/paths.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') 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 { Ok(ranger_path) } +#[cfg(not(target_os = "macos"))] pub fn hunter_path() -> HResult { let mut hunter_path = dirs_2::config_dir()?; hunter_path.push("hunter/"); Ok(hunter_path) } +#[cfg(target_os = "macos")] +pub fn hunter_path() -> HResult { + 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 { let mut config_path = hunter_path()?; config_path.push("config"); -- cgit v1.2.3