dropbox-api-command icon indicating copy to clipboard operation
dropbox-api-command copied to clipboard

skip files with bad file names

Open fbreitwieser opened this issue 11 years ago • 3 comments

Hello, thank you very much for this great API and command, it is vital for me on my ARM notebook.

The app sync works well. However, I encountered an issue with 'bad' file names:

# dropbox-api sync dropbox:/ /media/removable/SD\ Card/Dropbox
mkpath /var/host/media/removable/SD Card/Dropbox/Library/
Can't write to /var/host/media/removable/SD Card/Dropbox/Library/0006-3568(2001)051[0341:lndats]2.0.co;2.pdf.dropbox-api.tmp: 
Invalid argument at /usr/bin/site_perl/dropbox-api line 588.

It fails as the name contains a semicolon. These files should be skipped, or maybe there is another way to still write them. (Locally I just added a return if ($local_path=~ /;/);, but that might not be the best way)

fbreitwieser avatar Feb 18 '14 06:02 fbreitwieser

Thank you report. I have improved the problem of abnormal termination. https://github.com/s-aska/dropbox-api-command/commit/7ad78625b653e935c26d61a931a7509d69a0073e

However, the exit code of the command is 1 (error). In addition, the delete phase is not executed. It depends on the file system is whether can use a semicolon. Therefore, it was not able to uniformly skip.

s-aska avatar Feb 18 '14 07:02 s-aska

Hi s-aska, thank you for the quick reply. I wonder actually how those files got there, as I just use Linux.

fbreitwieser avatar Feb 19 '14 23:02 fbreitwieser

The file is available in my environment, as I just use OS X.

$ ls -l ~/Dropbox/test/
total 8
-rw-r--r--  1 aska  aska  5  2 18 16:09 0006-3568(2001)051[0341:lndats]2.0.co;2.pdf

s-aska avatar Jun 17 '14 21:06 s-aska