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.
This commit is contained in:
Eric Huss 2025-07-01 09:14:18 -07:00
parent ad3b725761
commit cda9bfef6f

View file

@ -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)