Skip to content

fix: escape remote names in sync download, copy and error output - #636

Open
dreyfus92 wants to merge 2 commits into
Backblaze:masterfrom
dreyfus92:fix/escape-sync-completion-names
Open

dreyfus92 wants to merge 2 commits into
Backblaze:masterfrom
dreyfus92:fix/escape-sync-completion-names

Conversation

@dreyfus92

Copy link
Copy Markdown

Fixes #631

the dnload and copy completion lines and the failed-action error line printed remote file names raw, so control characters reached the terminal. the other four action messages already escape.

  • dnload and copy now use escape_control_chars like the rest. plain names print the same, names with spaces get quoted (dnload 'my file.txt'), same as upload already does
  • the error line uses unprintable_to_hex instead, so normal error lines don't get wrapped in shell quotes

tests in test/unit/sync/test_sync_escaping.py fail with the fix reverted. the error-path one runs v1+ since v0 wraps IncompleteSync in CommandError. couldn't run windows locally, the test name uses U+009B which ntfs allows so it should be fine there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download and copy sync actions print remote file names without escape_control_chars

1 participant