| 237 | is_supported = (os.name != 'nt') |
| 238 | |
| 239 | def splitroot(self, part, sep=sep): |
| 240 | if part and part[0] == sep: |
| 241 | stripped_part = part.lstrip(sep) |
| 242 | # According to POSIX path resolution: |
| 243 | # http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html#tag_04_11 |
| 244 | # "A pathname that begins with two successive slashes may be |
| 245 | # interpreted in an implementation-defined manner, although more |
| 246 | # than two leading slashes shall be treated as a single slash". |
| 247 | if len(part) - len(stripped_part) == 2: |
| 248 | return '', sep * 2, stripped_part |
| 249 | else: |
| 250 | return '', sep, stripped_part |
| 251 | else: |
| 252 | return '', '', part |
| 253 | |
| 254 | def casefold(self, s): |
| 255 | return s |