diff options
| author | Shulhan <ms@kilabit.info> | 2019-08-05 12:33:05 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2019-08-05 22:24:27 +0700 |
| commit | 6a7af1bcdc9df1be93f85987bbfb4bd5ca4ee964 (patch) | |
| tree | 9463fc514617d161c035ed51ff5868a7807829de | |
| parent | ebadc5f7ad8ae64fd8bc8357efee6fbbd4e55025 (diff) | |
| download | pakakeh.go-6a7af1bcdc9df1be93f85987bbfb4bd5ca4ee964.tar.xz | |
lib/memfs: set the Node's Size to zero if node is directory
| -rw-r--r-- | lib/memfs/node.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/memfs/node.go b/lib/memfs/node.go index 4f35fcb3..94be0a2c 100644 --- a/lib/memfs/node.go +++ b/lib/memfs/node.go @@ -68,6 +68,7 @@ func NewNode(parent *Node, fi os.FileInfo, withContent bool) (node *Node, err er } if node.Mode.IsDir() || !withContent { + node.Size = 0 return node, nil } |
