summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/sftp_server.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py
index 59058432..7b634838 100644
--- a/paramiko/sftp_server.py
+++ b/paramiko/sftp_server.py
@@ -118,7 +118,7 @@ class SFTPServer (BaseSFTP, SubsystemHandler):
if e == errno.EACCES:
# permission denied
return SFTP_PERMISSION_DENIED
- elif e == errno.ENOENT:
+ elif (e == errno.ENOENT) or (e == errno.ENOTDIR):
# no such file
return SFTP_NO_SUCH_FILE
else: