1
mirror of https://github.com/rclone/rclone synced 2024-11-13 12:09:47 +01:00

drive: fix escaped chars in documents during list

Fixes #2591
This commit is contained in:
Fabian Möller 2018-09-18 14:21:13 +02:00 committed by Nick Craig-Wood
parent b94d87ae2d
commit 13823a7743

View File

@ -419,7 +419,7 @@ func (f *Fs) list(dirIDs []string, title string, directoriesOnly bool, filesOnly
// assume that export extensions don't contain escape sequences and only have one part (not .tar.gz)
if ext := path.Ext(searchTitle); handleGdocs && len(ext) > 0 && containsString(f.extensions, ext[1:]) {
stem = title[:len(title)-len(ext)]
query = append(query, fmt.Sprintf("(name='%s' or name='%s')", searchTitle, searchTitle[:len(title)-len(ext)]))
query = append(query, fmt.Sprintf("(name='%s' or name='%s')", searchTitle, searchTitle[:len(searchTitle)-len(ext)]))
} else {
query = append(query, fmt.Sprintf("name='%s'", searchTitle))
}