diff options
author | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2011-04-16 11:48:24 +0000 |
---|---|---|
committer | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2011-04-16 11:48:24 +0000 |
commit | e908da065f049cd6106e344ef20ebba259b75da4 (patch) | |
tree | 0cd02f084a777495fb55ea0418818f471ed1aa67 | |
parent | b1f0942b78b7cd13aa3e8d3b35a8705da7517192 (diff) | |
download | pyfilesystem-e908da065f049cd6106e344ef20ebba259b75da4.tar.gz |
OSFS.unsyspath: work correctly for root of drive
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@692 67cdc799-7952-0410-af00-57a81ceafa0f
-rw-r--r-- | fs/osfs/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/osfs/__init__.py b/fs/osfs/__init__.py index 8c1d1e4..c522ce9 100644 --- a/fs/osfs/__init__.py +++ b/fs/osfs/__init__.py @@ -163,6 +163,8 @@ class OSFS(OSFSXAttrMixin, OSFSWatchMixin, FS): """ path = os.path.normpath(os.path.abspath(path)) path = self._decode_path(path) + 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 |