From 61fe068c9067b361435b6e88bc69aae94d73dbc0 Mon Sep 17 00:00:00 2001 From: Muffin King Date: Wed, 16 Sep 2020 03:55:10 +0800 Subject: [PATCH] seafile: fix accessing libraries > 2GB on 32 bit systems - fixes #4588 --- backend/seafile/api/types.go | 2 +- backend/seafile/seafile.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/seafile/api/types.go b/backend/seafile/api/types.go index 4df24767c..9fb95c0cf 100644 --- a/backend/seafile/api/types.go +++ b/backend/seafile/api/types.go @@ -46,7 +46,7 @@ type Library struct { Encrypted bool `json:"encrypted"` Owner string `json:"owner"` ID string `json:"id"` - Size int `json:"size"` + Size int64 `json:"size"` Name string `json:"name"` Modified int64 `json:"mtime"` } diff --git a/backend/seafile/seafile.go b/backend/seafile/seafile.go index 7eb36080d..2c46812ed 100644 --- a/backend/seafile/seafile.go +++ b/backend/seafile/seafile.go @@ -1004,7 +1004,7 @@ func (f *Fs) listLibraries(ctx context.Context) (entries fs.DirEntries, err erro for _, library := range libraries { d := fs.NewDir(library.Name, time.Unix(library.Modified, 0)) - d.SetSize(int64(library.Size)) + d.SetSize(library.Size) entries = append(entries, d) }