]> git.sesse.net Git - betaftpd/commitdiff
If the xferlog file doesn't exist, BetaFTPD will now try to create one. Thanks to...
authorsgunderson <sgunderson>
Sat, 10 Mar 2001 18:03:14 +0000 (18:03 +0000)
committersgunderson <sgunderson>
Sat, 10 Mar 2001 18:03:14 +0000 (18:03 +0000)
ftpd.c

diff --git a/ftpd.c b/ftpd.c
index 2a84a715062c80c93f2d28cb93a976f95bc70a7b..2a01996e9004b167393baf4b9d121580018ddc4f 100644 (file)
--- a/ftpd.c
+++ b/ftpd.c
@@ -952,8 +952,8 @@ int main(void)
 #warning No xferlog support for nonroot yet
 #else
        /* open xferlog */
 #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);
 
        if (xferlog != NULL) {
                  fseek(xferlog, 0L, SEEK_END);