From 26397bff47bc1005a7d4b42a95bfb72f213cf26e Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Fri, 16 Dec 2005 10:00:02 -0800 Subject: [PATCH] [project @ robey@lag.net-20051216180002-5661c935adb8262e] ENOTDIR should be translated into NO_SUCH_FILE -- openssh does it, and there really isn't any better mapping for it --- paramiko/sftp_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index 5905843..7b63483 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: