summaryrefslogtreecommitdiff
path: root/fs/multifs.py
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2008-09-06 12:21:36 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2008-09-06 12:21:36 +0000
commit8a5b440f2e1ff6b90e120faeafacadeb960eb340 (patch)
tree54c58b3c433e2a0dcb5b0a09afd554515442f83d /fs/multifs.py
parent451cbab63276ac50849f7ec8dcf26d13f0467df9 (diff)
downloadpyfilesystem-8a5b440f2e1ff6b90e120faeafacadeb960eb340.tar.gz
Work in progress. More tests. Move helper function in to new helpers.py file.
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@56 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/multifs.py')
-rw-r--r--fs/multifs.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/multifs.py b/fs/multifs.py
index 0c35f3e..510eb2a 100644
--- a/fs/multifs.py
+++ b/fs/multifs.py
@@ -101,7 +101,7 @@ class MultiFS(FS):
try:
fs = self._delegate_search(path)
if fs is not None:
- return fs.getsyspath(path, allow_none)
+ return fs.getsyspath(path, allow_none=allow_none)
raise ResourceNotFoundError("NO_RESOURCE", path)
finally:
self._lock.release()
@@ -120,12 +120,12 @@ class MultiFS(FS):
self._lock.release()
- def open(self, path, mode="r", buffering=-1, **kwargs):
+ def open(self, path, mode="r",**kwargs):
self._lock.acquire()
try:
for fs in self:
if fs.exists(path):
- fs_file = fs.open(path, mode, buffering, **kwargs)
+ fs_file = fs.open(path, mode, **kwargs)
return fs_file
raise ResourceNotFoundError("NO_FILE", path)
@@ -206,6 +206,8 @@ class MultiFS(FS):
self._lock.release()
def rename(self, src, dst):
+ if not issamedir(src, dst):
+ raise ValueError("Destination path must the same directory (user the move method for moving to a different directory)")
self._lock.acquire()
try:
for fs in self: