##// END OF EJS Templates
run-tests: test for os.altsep instead of os.name when checking \ for /...
Simon Heimberg -
r19419:e823abe5 default
parent child Browse files
Show More
@@ -605,7 +605,7 b' def globmatch(el, l):'
605 # The only supported special characters are * and ? plus / which also
605 # The only supported special characters are * and ? plus / which also
606 # matches \ on windows. Escaping of these caracters is supported.
606 # matches \ on windows. Escaping of these caracters is supported.
607 if el + '\n' == l:
607 if el + '\n' == l:
608 if os.name == 'nt':
608 if os.altsep:
609 # matching on "/" is not needed for this line
609 # matching on "/" is not needed for this line
610 log("\nInfo, unnecessary glob: %s (glob)" % el)
610 log("\nInfo, unnecessary glob: %s (glob)" % el)
611 return True
611 return True
@@ -621,7 +621,7 b' def globmatch(el, l):'
621 res += '.*'
621 res += '.*'
622 elif c == '?':
622 elif c == '?':
623 res += '.'
623 res += '.'
624 elif c == '/' and os.name == 'nt':
624 elif c == '/' and os.altsep:
625 res += '[/\\\\]'
625 res += '[/\\\\]'
626 else:
626 else:
627 res += re.escape(c)
627 res += re.escape(c)
General Comments 0
You need to be logged in to leave comments. Login now