From 2e0322bc0eb88feb488395bafe8f1af5562d396b Mon Sep 17 00:00:00 2001 From: veeso Date: Thu, 9 Dec 2021 18:14:15 +0100 Subject: [PATCH] dir size is 0 on Windows --- src/host/mod.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/host/mod.rs b/src/host/mod.rs index c314715..ee5805e 100644 --- a/src/host/mod.rs +++ b/src/host/mod.rs @@ -514,11 +514,7 @@ impl Localhost { atime: attr.accessed().unwrap_or(SystemTime::UNIX_EPOCH), ctime: attr.created().unwrap_or(SystemTime::UNIX_EPOCH), mtime: attr.modified().unwrap_or(SystemTime::UNIX_EPOCH), - size: if path.is_dir() { - attr.blksize() - } else { - attr.len() - }, + size: if path.is_dir() { 0 } else { attr.len() }, symlink: fs::read_link(path.as_path()).ok(), uid: None, gid: None,