Improve error handling.
This commit is contained in:
parent
36250cf6fa
commit
2f8a9ba967
2 changed files with 7 additions and 4 deletions
|
|
@ -209,7 +209,11 @@ where
|
|||
) -> EtcActivationResult {
|
||||
let link_path = etc_dir.join(link_target);
|
||||
// Create the dir if it doesn't exist yet
|
||||
let dir_state = create_dir_recursively(&link_path, state)?;
|
||||
let dir_state = if !link_path.exists() {
|
||||
create_dir_recursively(&link_path, state)?
|
||||
} else {
|
||||
state
|
||||
};
|
||||
log::debug!("Entering into directory {}...", link_path.display());
|
||||
Ok(absolute_target
|
||||
.read_dir()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue