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:
parent
ad3b725761
commit
cda9bfef6f
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue