From 00bc8103dc2171defe1f3d05d9c94bf57a84d41c Mon Sep 17 00:00:00 2001 From: sgunderson Date: Wed, 16 Aug 2000 21:03:23 +0000 Subject: [PATCH] Report "File not found" etc. instead of just "Not a plain file" (contrary to traditional FTP daemons). --- cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds.c b/cmds.c index 64e4c1a..3af02a3 100644 --- a/cmds.c +++ b/cmds.c @@ -1745,9 +1745,9 @@ int do_openfile(struct conn * const c, char * const path, #if WANT_UPLOAD if ((flags & O_CREAT) == 0) { #endif - stat(ptr, &buf); + TRAP_ERROR(stat(ptr, &buf) == -1, 550, return -2); if (!S_ISREG(buf.st_mode)) { - numeric(c, 550, "%s: Not a plain file.", ptr); + numeric(c, 550, "Not a plain file.", ptr); return -2; } #if WANT_UPLOAD -- 2.39.2