Changes between Version 2 and Version 3 of Ticket #2235, comment 17


Ignore:
Timestamp:
2014-05-20T16:46:15Z (10 years ago)
Author:
daira
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2235, comment 17

    v2 v3  
    88{{{
    99if sys.platform == "win32":
     10    path = to_windows_long_path(path)
     11    [...]
     12
     13def to_windows_long_path(path):
    1014    if path.startswith(u"\\\\?\\") or path.startswith(u"\\\\.\\"):
    11         pass
     15        return path
    1216    elif path.startswith(u"\\\\"):
    13         path = u"\\\\?\\UNC\\" + path[2 :]
     17        return u"\\\\?\\UNC\\" + path[2 :]
    1418    else:
    15         path = u"\\\\?\\" + path
     19        return u"\\\\?\\" + path
    1620}}}
    1721but I don't actually care about long UNC paths; I just wanted to avoid doing something obviously incorrect for them.