Convert windows path to *nix path in sp
Fixes #2594 Note that os.path.normath converts '/' to '\\' on windows machines, but unfortunately not the other way around...
This commit is contained in:
1 parent
ea5d274f4d
commit
74561500b5
1 file changed
+4
@@ -54,6 +54,10 @@ def sp(path, *args):
|
|||||||
if not path or len(path) == 0:
|
if not path or len(path) == 0:
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
# convert windows path (from remote box) to *nix path
|
||||||
|
if os.path.sep == '/' and '\\' in path:
|
||||||
|
path = '/' + path.replace(':', '').replace('\\', '/')
|
||||||
|
|
||||||
path = os.path.normcase(os.path.normpath(ss(path, *args)))
|
path = os.path.normcase(os.path.normpath(ss(path, *args)))
|
||||||
|
|
||||||
if path != os.path.sep:
|
if path != os.path.sep:
|
||||||
|
|||||||
Reference in new issue
Block a user