Bug 1289949 - Make mozpack.path properly handle paths on mingw python. r=gps
Mingw python has a different os.path setup from native python, and has os.sep and os.altsep reversed. In that case, the normsep function was doing the wrong thing, leading to all sorts of problems. While fixing this, also ensure the corresponding unit test covers this peculiarity, even when running under the native win32 python.
This commit is contained in:
@@ -22,6 +22,8 @@ def normsep(path):
|
||||
'''
|
||||
if os.sep != '/':
|
||||
path = path.replace(os.sep, '/')
|
||||
if os.altsep and os.altsep != '/':
|
||||
path = path.replace(os.altsep, '/')
|
||||
return path
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user