#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