From: sgunderson Date: Sat, 10 Mar 2001 18:03:14 +0000 (+0000) Subject: If the xferlog file doesn't exist, BetaFTPD will now try to create one. Thanks to... X-Git-Url: https://git.sesse.net/?p=betaftpd;a=commitdiff_plain;h=14493d6b359df9a7c46fcafdd4208b0987bbba29 If the xferlog file doesn't exist, BetaFTPD will now try to create one. Thanks to Thor Bernhardsen and Per-Arne Holtmon Akø for notifying me of this. --- diff --git a/ftpd.c b/ftpd.c index 2a84a71..2a01996 100644 --- a/ftpd.c +++ b/ftpd.c @@ -952,8 +952,8 @@ int main(void) #warning No xferlog support for nonroot yet #else /* open xferlog */ - xferlog = fopen("/var/log/xferlog", "r+"); - if (xferlog == NULL) xferlog = fopen("/usr/adm/xferlog", "r+"); + xferlog = fopen("/var/log/xferlog", "a"); + if (xferlog == NULL) xferlog = fopen("/usr/adm/xferlog", "a"); if (xferlog != NULL) { fseek(xferlog, 0L, SEEK_END);