Skip to content

Commit 39bde32

Browse files
authored
fix(lenovonas_share): the size of the directory (#7914)
1 parent 779c293 commit 39bde32

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/lenovonas_share/types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ func (f File) GetPath() string {
4747
}
4848

4949
func (f File) GetSize() int64 {
50-
return f.Size
50+
if f.IsDir() {
51+
return 0
52+
} else {
53+
return f.Size
54+
}
5155
}
5256

5357
func (f File) GetName() string {
@@ -70,10 +74,6 @@ func (f File) GetID() string {
7074
return f.GetPath()
7175
}
7276

73-
func (f File) Thumb() string {
74-
return ""
75-
}
76-
7777
type Files struct {
7878
Data struct {
7979
List []File `json:"list"`

0 commit comments

Comments
 (0)