Open AntonD-mobilmir opened 7 years ago
Good catch, thanks for the report!
The sanitize function that strips special characters is definitely not bullet proof and needs to be reworked.
The --tokenize
option was added in PR #9. But it does not take into account the board names for now, but it would be possible to do it.
by the way. Without --tokenize, it failed much sooner due to 260-char path length limit. I tried prefixing output dir with \\?\
but it changed nothing, maybe because it uses relative paths names?
Maybe the best to do first would be to implement the --tokenize
feature for boards too (or any other resource being saved on disk) and see if the script can at least finish without errors.
It's easy:
in file backup.py you need to add more 'Bad' characters ( TAB, " and \ )to function sanitize_filename
change Line 46 from
` return re.sub(r'[<>:\/|\?*\']', '', name)[:FILE_NAME_MAXLENGTH] to
return re.sub(r'[<>:\/|\?*\'\t\\"]', '', name)[:FILE_NAME_MAX_LENGTH]`
some of my boards and cards have
\
and other special characters in their names. Some of characters, for example:
, already being replaced (with_
) before save, but others kept intact.Here is example: