MSYS2-packages/python2/0250-allow-win-drives-in-os-path-isabs.patch
2014-06-04 11:03:57 +04:00

17 lines
457 B
Diff

diff -Naur a/Lib/posixpath.py b/Lib/posixpath.py
--- a/Lib/posixpath.py 2014-05-31 22:58:39.000000000 +0400
+++ b/Lib/posixpath.py 2014-06-04 10:17:07.768600000 +0400
@@ -58,7 +58,11 @@
def isabs(s):
"""Test whether a path is absolute"""
- return s.startswith('/')
+ return s.startswith('/') or \
+ (sys.platform == 'msys' and \
+ len(s) > 2 and \
+ s[1] == ':' and \
+ (s[2] == os.sep or s[2] == '\\'))
# Join pathnames.