=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- src/usr.bin/ftp/fetch.c 2008/10/16 21:23:49 1.82 +++ src/usr.bin/ftp/fetch.c 2008/10/16 23:15:53 1.83 @@ -1,4 +1,4 @@ -/* $OpenBSD: fetch.c,v 1.82 2008/10/16 21:23:49 deraadt Exp $ */ +/* $OpenBSD: fetch.c,v 1.83 2008/10/16 23:15:53 martynas Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- @@ -31,7 +31,7 @@ */ #if !defined(lint) && !defined(SMALL) -static const char rcsid[] = "$OpenBSD: fetch.c,v 1.82 2008/10/16 21:23:49 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: fetch.c,v 1.83 2008/10/16 23:15:53 martynas Exp $"; #endif /* not lint and not SMALL */ /* @@ -261,7 +261,7 @@ else filesize = st.st_size; - /* Open the output file */ + /* Open the output file. */ if (strcmp(savefile, "-") != 0) { #ifndef SMALL if (resume) @@ -666,7 +666,8 @@ if (strcmp(savefile, "-") != 0) { #ifndef SMALL if (resume) - out = open(savefile, O_APPEND | O_WRONLY); + out = open(savefile, O_CREAT | O_WRONLY | O_APPEND, + 0666); else #endif /* !SMALL */ out = open(savefile, O_CREAT | O_WRONLY | O_TRUNC,