summaryrefslogtreecommitdiff
path: root/fs/base.py
diff options
context:
space:
mode:
authorrfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-30 02:18:33 +0000
committerrfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-30 02:18:33 +0000
commita4d07dc21e923d07888b714d77d1722ebc72e560 (patch)
tree493b08cd8fde73c7d68e3d6fbd48ad8d51fec2bc /fs/base.py
parent1b94412f932ca6243063581510c8097096a42f56 (diff)
downloadpyfilesystem-a4d07dc21e923d07888b714d77d1722ebc72e560.tar.gz
make LimitSizeFS more robust
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@684 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/base.py')
-rw-r--r--fs/base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/base.py b/fs/base.py
index b91fe04..7ca15bf 100644
--- a/fs/base.py
+++ b/fs/base.py
@@ -971,6 +971,9 @@ class FS(object):
try:
src_file = self.open(src, "rb")
self.setcontents(dst, src_file, chunk_size=chunk_size)
+ except ResourceNotFoundError:
+ if self.exists(src) and not self.exists(dirname(dst)):
+ raise ParentDirectoryMissingError(dst)
finally:
if src_file is not None:
src_file.close()