]> git.sesse.net Git - betaftpd/commitdiff
Report "File not found" etc. instead of just "Not a plain file" (contrary to traditio...
authorsgunderson <sgunderson>
Wed, 16 Aug 2000 21:03:23 +0000 (21:03 +0000)
committersgunderson <sgunderson>
Wed, 16 Aug 2000 21:03:23 +0000 (21:03 +0000)
cmds.c

diff --git a/cmds.c b/cmds.c
index 64e4c1a9eb86670d94a9db9cf60b3d5c1ea36f55..3af02a354c25f39f893b21b5d9b568a0154a77f5 100644 (file)
--- 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