about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2025-07-01 09:14:18 -0700
committerEric Huss <eric@huss.org>2025-07-01 09:14:18 -0700
commitcda9bfef6f7ce3bc1744c0ed41e53523efdc5bba (patch)
treea109ea1d76c82e7a366be82d86cbf3aeb0500ce9 /src/bootstrap
parentad3b7257615c28aaf8212a189ec032b8af75de51 (diff)
downloadrust-cda9bfef6f7ce3bc1744c0ed41e53523efdc5bba.tar.gz
rust-cda9bfef6f7ce3bc1744c0ed41e53523efdc5bba.zip
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.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/clean.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/clean.rs b/src/bootstrap/src/core/build_steps/clean.rs
index 882fcd08780..f67569d1486 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)