Skip to content

Commit dbb047b

Browse files
committed
WIP: Fix etc merge
1 parent 59559b1 commit dbb047b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/etc-merge/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,10 @@ pub fn merge(
736736
Ok(..) => { /* no-op */ }
737737
// Removed file's not present in the new etc dir, nothing to do
738738
Err(e) if e.kind() == std::io::ErrorKind::NotFound => continue,
739-
Err(e) => Err(e)?,
739+
Err(e) if e.kind() == std::io::ErrorKind::IsADirectory => {
740+
new_etc_fd.remove_dir_all(&removed).context(format!("Failed to remove dir {removed:?}"))?
741+
}
742+
Err(e) => Err(e).context(format!("Failed to remove file {removed:?}"))?,
740743
}
741744

742745
println!("- Removed file {removed:?}");

0 commit comments

Comments
 (0)