ENOTDIR should be translated into NO_SUCH_FILE -- openssh does it, and there really isn't any better mapping for it
This commit is contained in:
parent
a14384370c
commit
26397bff47
|
@ -118,7 +118,7 @@ class SFTPServer (BaseSFTP, SubsystemHandler):
|
||||||
if e == errno.EACCES:
|
if e == errno.EACCES:
|
||||||
# permission denied
|
# permission denied
|
||||||
return SFTP_PERMISSION_DENIED
|
return SFTP_PERMISSION_DENIED
|
||||||
elif e == errno.ENOENT:
|
elif (e == errno.ENOENT) or (e == errno.ENOTDIR):
|
||||||
# no such file
|
# no such file
|
||||||
return SFTP_NO_SUCH_FILE
|
return SFTP_NO_SUCH_FILE
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue