From: Jakob Date: Mon, 9 Dec 2019 21:26:46 +0000 (-0600) Subject: Fix fs._sanitize bug X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=1de161b937fa27efb4a1759e3252ede03f5e9cd1;p=bb-sync-api.git Fix fs._sanitize bug --- diff --git a/fs.py b/fs.py index 9046573..d29bae8 100644 --- a/fs.py +++ b/fs.py @@ -135,7 +135,7 @@ def get_child_versions(path): # https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file def _sanitize(seg): bad = {*map(chr, range(0, 31 + 1)), *r'<>:"/\|?*'} - return seg.translate({ch: '!' for ch in bad}) + return seg.translate({ord(ch): '!' for ch in bad}) def join_content_path(path, content_doc):