dropbox-api-command
dropbox-api-command copied to clipboard
sync fail when a new directory exists and it is not empty
Hi,
This:
$ mkdir .diff/foo
$ touch .diff/foo/bar
$ dropbox-api sync .diff dropbox:/diffs/ -d
upload foo/bar /diffs/foo/bar
mktree foo /diffs/foo
2018-02-14T13:40:43 [WebService::Dropbox] [ERROR] https://api.dropboxapi.com/2/files/create_folder {"path":"/diffs/foo"} -> [409] {"error_summary": "path/conflict/folder/..", "error": {".tag": "path", "path": {".tag": "conflict", "conflict": {".tag": "folder"}}}} at /usr/local/lib/perl5/site_perl/WebService/Dropbox.pm line 184.
{"error_summary": "path/conflict/folder/..", "error": {".tag": "path", "path": {".tag": "conflict", "conflict": {".tag": "folder"}}}} at /usr/local/bin/dropbox-api line 1014.
I am not quite sure why this happens, but what seems to happen is that it first uploads foo/bar, which creates the foo directory automatically, and then, it tries to create the foo directory and fails because it is already there.
Mmmm, and I get a similar problem when removing a non empty directory, it removes files in a random order, and removes the directory before removing all its content, and then tries to remove the last file, and fails because it went away with the directory.
delete boost-python-flavors/0001-Flavorize-boost-python-libs.patch
delete boost-python-flavors/0003-Invisible-typo.patch
delete boost-python-flavors
2018-02-15T09:09:12 [WebService::Dropbox] [ERROR] https://api.dropboxapi.com/2/files/delete {"path":"/diffs/boost-python-flavors/0002-Remove-boost-python3-libs-it-s-never-used.patch"} -> [409] {"error_summary": "path_lookup/not_found/...", "error": {".tag": "path_lookup", "path_lookup": {".tag": "not_found"}}} at /usr/local/lib/perl5/site_perl/WebService/Dropbox.pm line 184.
{"error_summary": "path_lookup/not_found/...", "error": {".tag": "path_lookup", "path_lookup": {".tag": "not_found"}}} at /usr/local/bin/dropbox-api line 1040.