From cc4f258ad4c7f4d3bd9fb01697e9f6633c5cf230 Mon Sep 17 00:00:00 2001 From: Tianyu Gao Date: Mon, 13 May 2019 16:05:00 +0800 Subject: [PATCH] Change size of the directory -> disk_inode.size Co-Authored-By: Wang Runji --- rcore-fs-sfs/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcore-fs-sfs/src/lib.rs b/rcore-fs-sfs/src/lib.rs index 06be195..967bf56 100644 --- a/rcore-fs-sfs/src/lib.rs +++ b/rcore-fs-sfs/src/lib.rs @@ -453,7 +453,7 @@ impl vfs::INode for INodeImpl { inode: self.id, size: match disk_inode.type_ { FileType::File | FileType::SymLink => disk_inode.size as usize, - FileType::Dir => disk_inode.blocks as usize, + FileType::Dir => disk_inode.size as usize, FileType::CharDevice => 0, FileType::BlockDevice => 0, _ => panic!("Unknown file type"),