From 1de161b937fa27efb4a1759e3252ede03f5e9cd1 Mon Sep 17 00:00:00 2001 From: Jakob Date: Mon, 9 Dec 2019 15:26:46 -0600 Subject: [PATCH] Fix fs._sanitize bug --- fs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- 2.30.2