diff options
Diffstat (limited to 'cli/ops/fs.rs')
-rw-r--r-- | cli/ops/fs.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/ops/fs.rs b/cli/ops/fs.rs index 499340deb..ee52f88b8 100644 --- a/cli/ops/fs.rs +++ b/cli/ops/fs.rs @@ -417,8 +417,11 @@ fn op_remove( std::fs::remove_file(&path)?; } } - } else { + } else if file_type.is_dir() { std::fs::remove_dir(&path)?; + } else { + // pipes, sockets, etc... + std::fs::remove_file(&path)?; } Ok(json!({})) }) |