8000 drive: remove part of workaround for #1675 · devdevmac/rclone@4d793b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4d793b8

Browse files
committed
drive: remove part of workaround for rclone#1675
Now that https://issuetracker.google.com/issues/64468406 has been fixed, we can remove part of the workaround which fixed rclone#1675 - 019adc3 This will make queries marginally more efficient. We still need the other part of the workaround since the `=` operator is case insensitive.
1 parent 9289aea commit 4d793b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/drive/drive.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,7 @@ func (f *Fs) list(dirID string, title string, directoriesOnly bool, filesOnly bo
294294
searchTitle = strings.Replace(searchTitle, `'`, `\'`, -1)
295295
// Convert / to / for search
296296
searchTitle = strings.Replace(searchTitle, "/", "/", -1)
297-
// use contains to work around #1675
298-
query = append(query, fmt.Sprintf("name contains '%s'", searchTitle))
297+
query = append(query, fmt.Sprintf("name='%s'", searchTitle))
299298
}
300299
if directoriesOnly {
301300
query = append(query, fmt.Sprintf("mimeType='%s'", driveFolderType))
@@ -343,7 +342,8 @@ OUTER:
343342
for _, item := range files.Files {
344343
// Convert / to / for listing purposes
345344
item.Name = strings.Replace(item.Name, "/", "/", -1)
346-
// skip items introduced by workaround (#1675)
345+
// Check the case of items is correct since
346+
// the `=` operator is case insensitive.
347347
if title != "" && title != item.Name {
348348
continue
349349
}

0 commit comments

Comments
 (0)
0