Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f624666 commit f3b4903Copy full SHA for f3b4903
1 file changed
Lib/dospath.py
@@ -10,6 +10,12 @@
10
# backslashes and maps invalid consecutive characters to a single '_'.
11
# Other normalizations (such as optimizing '../' away) are not allowed
12
# (this is done by normpath).
13
+#
14
+# Amrit: Things that can be valid regular expressions cannot be normalized
15
+# away. (which is pretty much all special characters)
16
17
+# I am assuming that at least these chars may be used:
18
+# [, ], |, *, +, ?
19
20
mapchar = '_'
21
@@ -20,7 +26,7 @@ def normcase(s):
26
res = res + os.sep
27
elif c == '.' and res[-1:] == os.sep:
22
28
res = res + mapchar + c
23
- elif ord(c) < 32 or c in ' "*+,:;<=>?[]|':
29
+ elif ord(c) < 32 or c in ' ",:;<=>':
24
30
if res[-1:] != mapchar:
25
31
res = res + mapchar
32
else:
0 commit comments