2016-12-08 | Paul Boddie | raw files shortlog changelog graph | Avoid storing purely local or top-level names in the encoded path registry. | |
encoders.py (file) |
1.1 --- a/encoders.py Thu Dec 08 22:50:32 2016 +0100 1.2 +++ b/encoders.py Thu Dec 08 23:30:24 2016 +0100 1.3 @@ -356,6 +356,10 @@ 1.4 return "__%s" % path 1.5 else: 1.6 part_encoded = path.replace("#", "__").replace("$", "__") 1.7 + 1.8 + if "." not in path: 1.9 + return part_encoded 1.10 + 1.11 encoded = part_encoded.replace(".", "_") 1.12 1.13 # Test for a conflict with the encoding of a different path, re-encoding