1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-10 03:17:35 +02:00

Fix , assume pipe file be zero-sized ()

* Fix , assume pipe file be zero-sized

* rust fmt
This commit is contained in:
Justin Ma
2022-05-20 22:27:21 +08:00
committed by GitHub
parent 6efd1bcb3f
commit 0ba86d7eb8

@ -451,8 +451,10 @@ pub(crate) fn dir_entry_dict(
cols.push("size".to_string()); cols.push("size".to_string());
if let Some(md) = metadata { if let Some(md) = metadata {
let zero_sized = let zero_sized = file_type == "pipe"
file_type == "socket" || file_type == "block device" || file_type == "char device"; || file_type == "socket"
|| file_type == "char device"
|| file_type == "block device";
if md.is_dir() { if md.is_dir() {
if du { if du {