forked from TrueCloudLab/rclone
drive: convert / in names to a unicode equivalent (/) - fixes #62
This commit is contained in:
parent
d981456ddc
commit
b44d0ea088
1 changed files with 4 additions and 0 deletions
|
@ -231,6 +231,8 @@ func (f *Fs) list(dirID string, title string, directoriesOnly bool, filesOnly bo
|
||||||
// Escaping the backslash isn't documented but seems to work
|
// Escaping the backslash isn't documented but seems to work
|
||||||
title = strings.Replace(title, `\`, `\\`, -1)
|
title = strings.Replace(title, `\`, `\\`, -1)
|
||||||
title = strings.Replace(title, `'`, `\'`, -1)
|
title = strings.Replace(title, `'`, `\'`, -1)
|
||||||
|
// Convert / to / for search
|
||||||
|
title = strings.Replace(title, "/", "/", -1)
|
||||||
query = append(query, fmt.Sprintf("title='%s'", title))
|
query = append(query, fmt.Sprintf("title='%s'", title))
|
||||||
}
|
}
|
||||||
if directoriesOnly {
|
if directoriesOnly {
|
||||||
|
@ -273,6 +275,8 @@ OUTER:
|
||||||
return false, errors.Wrap(err, "couldn't list directory")
|
return false, errors.Wrap(err, "couldn't list directory")
|
||||||
}
|
}
|
||||||
for _, item := range files.Items {
|
for _, item := range files.Items {
|
||||||
|
// Convert / to / for listing purposes
|
||||||
|
item.Title = strings.Replace(item.Title, "/", "/", -1)
|
||||||
if fn(item) {
|
if fn(item) {
|
||||||
found = true
|
found = true
|
||||||
break OUTER
|
break OUTER
|
||||||
|
|
Loading…
Reference in a new issue