Skip to content

Commit 826d4bc

Browse files
authored
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.
2 parents e080bc8 + cda9bfe commit 826d4bc

File tree

1 file changed

+1
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+1
-1
lines changed

src/bootstrap/src/core/build_steps/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ fn rm_rf(path: &Path) {
181181
panic!("failed to get metadata for file {}: {}", path.display(), e);
182182
}
183183
Ok(metadata) => {
184-
if metadata.file_type().is_file() || metadata.file_type().is_symlink() {
184+
if !metadata.file_type().is_dir() {
185185
do_op(path, "remove file", |p| match fs::remove_file(p) {
186186
#[cfg(windows)]
187187
Err(e)

0 commit comments

Comments
 (0)