dir size is 0 on Windows

This commit is contained in:
veeso
2021-12-09 18:14:15 +01:00
committed by Christian Visintin
parent df7a4381c4
commit 2e0322bc0e

View File

@@ -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,