diff options
author | willmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f> | 2013-09-09 20:02:26 +0000 |
---|---|---|
committer | willmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f> | 2013-09-09 20:02:26 +0000 |
commit | 94b546518369b66e2ea69d89248a0077a5332f6d (patch) | |
tree | 592231cd81aebe8ffdd338f895dfeaee5fcb66c1 | |
parent | 9cc5eb224602725b599adae171084c1eeb21e249 (diff) | |
download | pyfilesystem-94b546518369b66e2ea69d89248a0077a5332f6d.tar.gz |
Fix for mountfs with no mounts #162
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@866 67cdc799-7952-0410-af00-57a81ceafa0f
-rw-r--r-- | fs/mountfs.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/mountfs.py b/fs/mountfs.py index fce3a19..c7eabaf 100644 --- a/fs/mountfs.py +++ b/fs/mountfs.py @@ -246,6 +246,8 @@ class MountFS(FS): fs, _mount_path, delegate_path = self._delegate(path) if fs is None: + if path in ("/", ""): + return raise ResourceNotFoundError(path) if fs is self: @@ -465,6 +467,8 @@ class MountFS(FS): fs, _mount_path, delegate_path = self._delegate(path) if fs is None: + if path in ("/", ""): + return {} raise ResourceNotFoundError(path) if fs is self: @@ -499,6 +503,8 @@ class MountFS(FS): path = normpath(path) fs, _mount_path, delegate_path = self._delegate(path) if fs is None: + if path in ("/", ""): + return default raise ResourceNotFoundError(path) if fs is self: return default |