Commit 1d9bd34e by rfkelly0

fix error reporting in movedir(src,dst) when src is missing

parent 214a5448
...@@ -301,7 +301,7 @@ class SFTPFS(FS): ...@@ -301,7 +301,7 @@ class SFTPFS(FS):
self.client.rename(nsrc,ndst) self.client.rename(nsrc,ndst)
except IOError, e: except IOError, e:
if getattr(e,"errno",None) == 2: if getattr(e,"errno",None) == 2:
raise ResourceNotFoundError(path) raise ResourceNotFoundError(src)
if self.exists(dst): if self.exists(dst):
raise DestinationExistsError(dst) raise DestinationExistsError(dst)
if not self.isdir(dirname(dst)): if not self.isdir(dirname(dst)):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment