Skip to content
Snippets Groups Projects
Verified Commit 3dcc463e authored by nfontrod's avatar nfontrod
Browse files

src/pull.rs: fix get_config_dir function

parent 7a8dd7f5
Branches
No related tags found
No related merge requests found
...@@ -175,7 +175,7 @@ fn get_config_dir() -> PathBuf { ...@@ -175,7 +175,7 @@ fn get_config_dir() -> PathBuf {
Ok(p) => check_ok(&p), Ok(p) => check_ok(&p),
Err(_) => config, Err(_) => config,
}; };
new_config.push("borg") new_config.push("borg");
new_config new_config
} else { } else {
let config_path = match std::env::var("BORG_CONFIG_DIR") { let config_path = match std::env::var("BORG_CONFIG_DIR") {
...@@ -188,13 +188,12 @@ fn get_config_dir() -> PathBuf { ...@@ -188,13 +188,12 @@ fn get_config_dir() -> PathBuf {
config_path config_path
}; };
if !new_config.is_dir() { if !new_config.is_dir() {
eprintln!("{}: Failed to get borg config dir", &config_path.display()); eprintln!("{}: Failed to get borg config dir", &new_config.display());
exit(1); exit(1);
} }
new_config new_config
} }
/// This function aims to get the borg security dir /// This function aims to get the borg security dir
/// ///
/// # Description /// # Description
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment