Skip to content

Commit

Permalink
drive: fix escaped chars in documents during list
Browse files Browse the repository at this point in the history
Fixes #2591
  • Loading branch information
B4dM4n authored and ncw committed Sep 18, 2018
1 parent b94d87a commit 13823a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/drive/drive.go
Expand Up @@ -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))
}
Expand Down

0 comments on commit 13823a7

Please sign in to comment.