diff options
author | Will McGugan <willmcgugan@gmail.com> | 2015-10-16 23:26:37 +0100 |
---|---|---|
committer | Will McGugan <willmcgugan@gmail.com> | 2015-10-16 23:26:37 +0100 |
commit | 24ce239980ea881d41cebf8374fd5a68b3701fef (patch) | |
tree | 5b244724a95f10b28834f81d89e44d5c939cace4 | |
parent | 9d9440e5544abe9742e23e41697f1e0d45f6d86e (diff) | |
download | pyfilesystem-git-24ce239980ea881d41cebf8374fd5a68b3701fef.tar.gz |
fix unsyspath in non windows
-rw-r--r-- | fs/osfs/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/osfs/__init__.py b/fs/osfs/__init__.py index 446ef93..0e4039c 100644 --- a/fs/osfs/__init__.py +++ b/fs/osfs/__init__.py @@ -182,10 +182,12 @@ class OSFS(OSFSXAttrMixin, OSFSWatchMixin, FS): :rtype: string """ + # TODO: HAve a closer look at this method path = os.path.normpath(os.path.abspath(path)) path = self._decode_path(path) - if len(path) == 6 and not path.endswith("\\"): - path = path + "\\" + if sys.platform == "win32": + if len(path) == 6 and not path.endswith("\\"): + path = path + "\\" prefix = os.path.normcase(self.root_path) if not prefix.endswith(os.path.sep): prefix += os.path.sep |