summaryrefslogtreecommitdiff
path: root/fs/sftpfs.py
diff options
context:
space:
mode:
authorrfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f>2010-02-16 00:27:08 +0000
committerrfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f>2010-02-16 00:27:08 +0000
commit660f4c74c7ba1b54405ef0a467df0d5a122fd891 (patch)
treed8d39dc623b61195bf2ada7c3c6e592e919fd140 /fs/sftpfs.py
parent012495ddd5eb73e5e9481644d303549cc31e98c5 (diff)
downloadpyfilesystem-660f4c74c7ba1b54405ef0a467df0d5a122fd891.tar.gz
ensure that rename() raises ParentDirectoryMissingError when appropriate
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@326 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/sftpfs.py')
-rw-r--r--fs/sftpfs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sftpfs.py b/fs/sftpfs.py
index 67daeb3..de945b3 100644
--- a/fs/sftpfs.py
+++ b/fs/sftpfs.py
@@ -263,6 +263,8 @@ class SFTPFS(FS):
except IOError, e:
if getattr(e,"errno",None) == 2:
raise ResourceNotFoundError(path)
+ if not self.isdir(dirname(dst)):
+ raise ParentDirectoryMissingError(dst)
raise
@convert_os_errors