Skip to content

Commit cda9bfe

Browse files
committed
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.
1 parent ad3b725 commit cda9bfe

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)