Show More
@@ -6,6 +6,7 b'' | |||
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | 8 | from i18n import _ |
|
9 | import encoding | |
|
9 | 10 | import os, sys, errno, stat, getpass, pwd, grp, tempfile, unicodedata |
|
10 | 11 | |
|
11 | 12 | posixfile = open |
@@ -164,9 +165,6 b' def samedevice(fpath1, fpath2):' | |||
|
164 | 165 | st2 = os.lstat(fpath2) |
|
165 | 166 | return st1.st_dev == st2.st_dev |
|
166 | 167 | |
|
167 | encodinglower = None | |
|
168 | encodingupper = None | |
|
169 | ||
|
170 | 168 | # os.path.normcase is a no-op, which doesn't help us on non-native filesystems |
|
171 | 169 | def normcase(path): |
|
172 | 170 | return path.lower() |
@@ -255,7 +253,7 b" if sys.platform == 'cygwin':" | |||
|
255 | 253 | pathlen = len(path) |
|
256 | 254 | if (pathlen == 0) or (path[0] != os.sep): |
|
257 | 255 | # treat as relative |
|
258 | return encodingupper(path) | |
|
256 | return encoding.upper(path) | |
|
259 | 257 | |
|
260 | 258 | # to preserve case of mountpoint part |
|
261 | 259 | for mp in cygwinmountpoints: |
@@ -266,9 +264,9 b" if sys.platform == 'cygwin':" | |||
|
266 | 264 | if mplen == pathlen: # mount point itself |
|
267 | 265 | return mp |
|
268 | 266 | if path[mplen] == os.sep: |
|
269 | return mp + encodingupper(path[mplen:]) | |
|
267 | return mp + encoding.upper(path[mplen:]) | |
|
270 | 268 | |
|
271 | return encodingupper(path) | |
|
269 | return encoding.upper(path) | |
|
272 | 270 | |
|
273 | 271 | # Cygwin translates native ACLs to POSIX permissions, |
|
274 | 272 | # but these translations are not supported by native |
@@ -24,9 +24,6 b" if os.name == 'nt':" | |||
|
24 | 24 | else: |
|
25 | 25 | import posix as platform |
|
26 | 26 | |
|
27 | platform.encodinglower = encoding.lower | |
|
28 | platform.encodingupper = encoding.upper | |
|
29 | ||
|
30 | 27 | cachestat = platform.cachestat |
|
31 | 28 | checkexec = platform.checkexec |
|
32 | 29 | checklink = platform.checklink |
@@ -130,11 +130,8 b' def localpath(path):' | |||
|
130 | 130 | def normpath(path): |
|
131 | 131 | return pconvert(os.path.normpath(path)) |
|
132 | 132 | |
|
133 | encodinglower = None | |
|
134 | encodingupper = None | |
|
135 | ||
|
136 | 133 | def normcase(path): |
|
137 | return encodingupper(path) | |
|
134 | return encoding.upper(path) | |
|
138 | 135 | |
|
139 | 136 | def realpath(path): |
|
140 | 137 | ''' |
General Comments 0
You need to be logged in to leave comments.
Login now