From cda9bfef6f7ce3bc1744c0ed41e53523efdc5bba Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 1 Jul 2025 09:14:18 -0700 Subject: [PATCH] Fix `x clean` with a fifo `x clean` was failing when it encountered a special file like a fifo because it thought it was a directory. --- src/bootstrap/src/core/build_steps/clean.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/src/core/build_steps/clean.rs b/src/bootstrap/src/core/build_steps/clean.rs index 882fcd087800b..f67569d148607 100644 --- a/src/bootstrap/src/core/build_steps/clean.rs +++ b/src/bootstrap/src/core/build_steps/clean.rs @@ -181,7 +181,7 @@ fn rm_rf(path: &Path) { panic!("failed to get metadata for file {}: {}", path.display(), e); } Ok(metadata) => { - if metadata.file_type().is_file() || metadata.file_type().is_symlink() { + if !metadata.file_type().is_dir() { do_op(path, "remove file", |p| match fs::remove_file(p) { #[cfg(windows)] Err(e)