dropbox / dbxcli

A command line client for Dropbox built using the Go SDK
Other
1.05k stars 100 forks source link

Move error when moving between subfolders #102

Closed nobias closed 5 years ago

nobias commented 6 years ago

Hi! Thanks for this very useful piece of software! I was trying to rename a file in a particular subfolder of my Dropbox: dbxcli mv /foo/tmp/trace.pdf /foo/tmp/trace2.pdf -v

Here's the error output that I got:

2018/09/11 19:28:55 sdk.go:93: arg: &{{/foo/tmp/trace.pdf /foo/tmp/trace2.pdf//foo/tmp/trace.pdf} false false false}
2018/09/11 19:28:55 sdk.go:93: req: &{POST https://api.dropboxapi.com/2/files/move_v2 HTTP/1.1 1 1 map[Content-Type:[application/json]] {0xc420079620} 0x125e910 234 [] false api.dropboxapi.com map[] map[] <nil> map[]   <nil> <nil> <nil> <nil>}
2018/09/11 19:28:55 sdk.go:93: resp: &{409 Conflict 409 HTTP/1.1 1 1 map[Connection:[keep-alive] X-Dropbox-Request-Id:[744e8225b8b1c569c19469211a98a92b] X-Frame-Options:[DENY] Date:[Tue, 11 Sep 2018 23:28:55 GMT] Content-Type:[application/json] X-Content-Type-Options:[nosniff] Content-Disposition:[attachment; filename='error'] Server:[nginx] Content-Security-Policy:[sandbox; frame-ancestors 'none']] 0xc420210080 -1 [chunked] false false map[] 0xc4200fe300 0xc42033a000}
2018/09/11 19:28:55 sdk.go:93: body: [123 34 101 114 114 111 114 95 115 117 109 109 97 114 121 34 58 32 34 116 111 47 109 97 108 102 111 114 109 101 100 95 112 97 116 104 47 46 46 34 44 32 34 101 114 114 111 114 34 58 32 123 34 46 116 97 103 34 58 32 34 116 111 34 44 32 34 116 111 34 58 32 123 34 46 116 97 103 34 58 32 34 109 97 108 102 111 114 109 101 100 95 112 97 116 104 34 125 125 125]
Move error: &{{/foo/tmp/trace.pdf /foo/tmp/trace2.pdf//foo/tmp/trace.pdf} false false false}

I also tried moving a file from one subfolder to a different, existing subfolder. This results in a similar error: Looking at the first line of the output, it seems that dbxcli appends the full source path to the destination path, and not just the part after the last slash, as GNU mv would do. Or am I using the command in the wrong way?

vaithak commented 6 years ago

I would like to work on this issue.