Site
Gitweb
Static
projects
/
bb-sync-api.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c1102a
)
Fix fs._sanitize bug
author
Jakob
<jakob@jcornell.net>
Mon, 9 Dec 2019 21:26:46 +0000
(15:26 -0600)
committer
Jakob
<jakob@jcornell.net>
Mon, 9 Dec 2019 21:26:46 +0000
(15:26 -0600)
fs.py
patch
|
blob
|
history
diff --git
a/fs.py
b/fs.py
index 9046573f1c558e2af8804189573fa8905e241aff..d29bae813d73991951f2eccbd88ce3bda928f690 100644
(file)
--- 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):