HTTP remote error copying file with % in filename

Trying to use an http remote to copy some files to a google drive remote. Whenever it hits a file with a % symbol in the name (to clarify, not %20 like the space character, it’s a file with a name like “100% effort.pdf”)

Error text below:

2017/08/29 00:45:42 INFO  : Google drive root 'dir/thing': Modify window is 1s
2017/08/29 00:45:44 ERROR : Error parsing "29280 100% 5.cbr" as URL: parse 29280 100% 5.cbr: invalid URL escape "% 5"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x64ce36]

goroutine 173 [running]:
net/url.(*URL).ResolveReference(0xc4203a2680, 0x0, 0xe521f2)
        /opt/go/go1.8/src/net/url/url.go:944 +0x36
github.com/ncw/rclone/http.urlJoin(0xc4203a2680, 0xc4204e8940, 0x10, 0x10)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:71 +0x15c
github.com/ncw/rclone/http.parseName(0xc4203a2680, 0xc4204a3580, 0x16, 0xc420139147, 0x37, 0xc4204ed801)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:203 +0x6c
github.com/ncw/rclone/http.parse.func1(0xc42032bea0)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:243 +0x18d
github.com/ncw/rclone/http.parse.func1(0xc420622a10)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:252 +0x147
github.com/ncw/rclone/http.parse.func1(0xc4206227e0)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:252 +0x147
github.com/ncw/rclone/http.parse.func1(0xc420622540)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:252 +0x147
github.com/ncw/rclone/http.parse.func1(0xc4206224d0)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:252 +0x147
github.com/ncw/rclone/http.parse(0xc4203a2680, 0x7f38e170d518, 0xc4204a2be0, 0xc4204ed800, 0x36, 0x40, 0x1, 0x2)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:255 +0x109
github.com/ncw/rclone/http.(*Fs).readDir(0xc42026e240, 0xc4204ab230, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:278 +0x40f
github.com/ncw/rclone/http.(*Fs).List(0xc42026e240, 0xc4204ab230, 0x21, 0x0, 0x18, 0xc420239fa8, 0x72ac9a, 0xc420239f28)
        /home/ncw/go/src/github.com/ncw/rclone/http/http.go:301 +0xc3
github.com/ncw/rclone/fs.ListDirSorted(0x13127c0, 0xc42026e240, 0x428b00, 0xc4203282e0, 0x20, 0x0, 0x737b23, 0xc420239f48, 0xc420239f40, 0xc4203ad480)
        /home/ncw/go/src/github.com/ncw/rclone/fs/operations.go:615 +0x63
github.com/ncw/rclone/fs.(*syncCopyMove).makeListDir.func1(0xc4203282e0, 0x20, 0xc4205175a0, 0x200001, 0xc420239ed7, 0x0, 0x0)
        /home/ncw/go/src/github.com/ncw/rclone/fs/sync.go:134 +0x53
github.com/ncw/rclone/fs.(*syncCopyMove)._run.func1(0xc4205175a0, 0xc4204fb8a0, 0xc420517580, 0xc4204bd040, 0xc4203282e0, 0x20, 0x7ffffffc, 0x0, 0x100)
        /home/ncw/go/src/github.com/ncw/rclone/fs/sync.go:923 +0x72
created by github.com/ncw/rclone/fs.(*syncCopyMove)._run
        /home/ncw/go/src/github.com/ncw/rclone/fs/sync.go:924 +0x987

I fixed various issues with the http support - can you try the latest beta?

That seems to have fixed it. Thanks mate!

Love what you guys do.

1 Like