drive: log an ERROR if an incomplete search is returned

This commit is contained in:
Nick Craig-Wood 2019-10-26 22:01:07 +01:00
parent 422ad38e5b
commit 4499b08afc

View File

@ -744,7 +744,7 @@ func (f *Fs) list(ctx context.Context, dirIDs []string, title string, directorie
fields += ",quotaBytesUsed" fields += ",quotaBytesUsed"
} }
fields = fmt.Sprintf("files(%s),nextPageToken", fields) fields = fmt.Sprintf("files(%s),nextPageToken,incompleteSearch", fields)
OUTER: OUTER:
for { for {
@ -756,6 +756,9 @@ OUTER:
if err != nil { if err != nil {
return false, errors.Wrap(err, "couldn't list directory") return false, errors.Wrap(err, "couldn't list directory")
} }
if files.IncompleteSearch {
fs.Errorf(f, "search result INCOMPLETE")
}
for _, item := range files.Files { for _, item := range files.Files {
item.Name = f.opt.Enc.ToStandardName(item.Name) item.Name = f.opt.Enc.ToStandardName(item.Name)
// Check the case of items is correct since // Check the case of items is correct since