mirror of https://github.com/bobwen-dev/hunter
testing conditional compilation
This commit is contained in:
parent
e8d9c6ad1f
commit
8a997042d3
11
src/paths.rs
11
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");
|
||||
|
|
Loading…
Reference in New Issue