Ignore zero-size files (most likely those which hasn't completed uploading)

pull/543/head
Metric-Void 5 years ago
parent bfd2340732
commit 88d17800cd
No known key found for this signature in database
GPG Key ID: A032823AD5C034B3

@ -44,7 +44,7 @@ func (handler Driver) List(ctx context.Context, base string, recursive bool) ([]
for _, object := range objects {
source := path.Join(base, object.Name)
rel, err := filepath.Rel(rootPath, source)
if err != nil {
if err != nil || (object.Folder==nil && object.Size==0) {
continue
}
res = append(res, response.Object{

Loading…
Cancel
Save