Skip to content

Commit

Permalink
Fix filename bug
Browse files Browse the repository at this point in the history
  • Loading branch information
klpl committed Dec 24, 2014
1 parent abfcc1d commit 9543b82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ func (r *Remote) findByPathRecv(parentId string, p []string) (file *File, err er
// find the file or directory under parentId and titled with p[0]
req := r.service.Files.List()
// TODO: use field selectors
req.Q(fmt.Sprintf("'%s' in parents and title = '%s' and trashed=false", parentId, p[0]))
title := strings.Replace(p[0], "'", "\\'", -1)
req.Q(fmt.Sprintf("'%s' in parents and title = '%s' and trashed=false", parentId, title))
files, err := req.Do()
if err != nil || len(files.Items) < 1 {
// TODO: make sure only 404s are handled here
Expand Down

0 comments on commit 9543b82

Please sign in to comment.