forked from extern/nushell
Fix deleting / showing ls
named pipes and other fs objects no… (#1461)
* Fix deleting named pipes * Use std::os::unix::fs::FileTypeExt to show correct type for unix-specific fs objects; Fix formatting Co-authored-by: Linards Kalvāns <linards.kalvans@twino.eu>
This commit is contained in:
@ -978,7 +978,7 @@ impl Shell for FilesystemShell {
|
||||
};
|
||||
|
||||
let valid_target =
|
||||
f.is_file() || (f.is_dir() && (is_empty || recursive.item));
|
||||
f.exists() && (!f.is_dir() || (is_empty || recursive.item));
|
||||
if valid_target {
|
||||
if trash.item {
|
||||
match SendToTrash::remove(f) {
|
||||
|
Reference in New Issue
Block a user