diff options
author | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-02-16 00:27:08 +0000 |
---|---|---|
committer | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-02-16 00:27:08 +0000 |
commit | 660f4c74c7ba1b54405ef0a467df0d5a122fd891 (patch) | |
tree | d8d39dc623b61195bf2ada7c3c6e592e919fd140 /fs/sftpfs.py | |
parent | 012495ddd5eb73e5e9481644d303549cc31e98c5 (diff) | |
download | pyfilesystem-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.py | 2 |
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 |