From 39bde328ee10e226a6ee1689c3ae979ee10566cb Mon Sep 17 00:00:00 2001 From: Sakana Date: Sat, 1 Feb 2025 17:32:58 +0800 Subject: [PATCH] fix(lenovonas_share): the size of the directory (#7914) --- drivers/lenovonas_share/types.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/lenovonas_share/types.go b/drivers/lenovonas_share/types.go index 77b966d3bee8..37ff14655249 100644 --- a/drivers/lenovonas_share/types.go +++ b/drivers/lenovonas_share/types.go @@ -47,7 +47,11 @@ func (f File) GetPath() string { } func (f File) GetSize() int64 { - return f.Size + if f.IsDir() { + return 0 + } else { + return f.Size + } } func (f File) GetName() string { @@ -70,10 +74,6 @@ func (f File) GetID() string { return f.GetPath() } -func (f File) Thumb() string { - return "" -} - type Files struct { Data struct { List []File `json:"list"`