Skip to content

Commit

Permalink
fix(lenovonas_share): the size of the directory (#7914)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangRucheng authored Feb 1, 2025
1 parent 779c293 commit 39bde32
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/lenovonas_share/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"`
Expand Down

0 comments on commit 39bde32

Please sign in to comment.