Skip to content

Commit 24ce239

Browse files
committed
fix unsyspath in non windows
1 parent 9d9440e commit 24ce239

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

fs/osfs/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@ def unsyspath(self, path):
182182
:rtype: string
183183
184184
"""
185+
# TODO: HAve a closer look at this method
185186
path = os.path.normpath(os.path.abspath(path))
186187
path = self._decode_path(path)
187-
if len(path) == 6 and not path.endswith("\\"):
188-
path = path + "\\"
188+
if sys.platform == "win32":
189+
if len(path) == 6 and not path.endswith("\\"):
190+
path = path + "\\"
189191
prefix = os.path.normcase(self.root_path)
190192
if not prefix.endswith(os.path.sep):
191193
prefix += os.path.sep

0 commit comments

Comments
 (0)