about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-07-04 05:47:23 +0200
committerGitHub <noreply@github.com>2025-07-04 05:47:23 +0200
commit826d4bc858a323d51c6bcd98a5b2076cdb651435 (patch)
tree24f4cff880d3ea88167cc9904d91f49fefd894ff /src
parente080bc875112a71b7f3043057c661e064eab5b69 (diff)
parentcda9bfef6f7ce3bc1744c0ed41e53523efdc5bba (diff)
downloadrust-826d4bc858a323d51c6bcd98a5b2076cdb651435.tar.gz
rust-826d4bc858a323d51c6bcd98a5b2076cdb651435.zip
Rollup merge of #143288 - ehuss:fix-clean-fifo, r=Kobzol
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')
-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)