summaryrefslogtreecommitdiff
path: root/fs/osfs
diff options
context:
space:
mode:
authorrfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f>2011-04-16 11:48:24 +0000
committerrfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f>2011-04-16 11:48:24 +0000
commite908da065f049cd6106e344ef20ebba259b75da4 (patch)
tree0cd02f084a777495fb55ea0418818f471ed1aa67 /fs/osfs
parentb1f0942b78b7cd13aa3e8d3b35a8705da7517192 (diff)
downloadpyfilesystem-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
Diffstat (limited to 'fs/osfs')
-rw-r--r--fs/osfs/__init__.py2
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