Skip to content

Commit f5738f6

Browse files
committed
WIP: Fix etc merge
1 parent b2d4b79 commit f5738f6

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
@@ -737,7 +737,10 @@ pub fn merge(
737737
Ok(..) => { /* no-op */ }
738738
// Removed file's not present in the new etc dir, nothing to do
739739
Err(e) if e.kind() == std::io::ErrorKind::NotFound => continue,
740-
Err(e) => Err(e)?,
740+
Err(e) if e.kind() == std::io::ErrorKind::IsADirectory => {
741+
new_etc_fd.remove_dir_all(&removed).context(format!("Failed to remove dir {removed:?}"))?
742+
}
743+
Err(e) => Err(e).context(format!("Failed to remove file {removed:?}"))?,
741744
}
742745

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

0 commit comments

Comments
 (0)