[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] [PATCH 03/25] Bugfix: Fix NULL filename and output_stream
From: |
Matthew White |
Subject: |
Re: [Bug-wget] [PATCH 03/25] Bugfix: Fix NULL filename and output_stream in Metalink module |
Date: |
Tue, 13 Sep 2016 06:49:40 +0200 |
On Sun, 11 Sep 2016 21:59:12 +0200
Giuseppe Scrivano <address@hidden> wrote:
> Matthew White <address@hidden> writes:
>
> > + */
> > + if (!output_stream && (output_stream = fopen (filename,
> > "rb")))
> > + {
> > + fclose (output_stream);
> > + output_stream = fopen (filename, "ab");
> > + }
>
> please use file_exists_p instead of opening and closing the file:
>
> if (!output_stream && file_exists_p (output_stream))
> output_stream = fopen (filename, "ab");
Thanks Giuseppe.
Amended with 'if (!output_stream && file_exists_p (filename))'.
Posting after final decisions are taken about open topics in this series of
patches.
>
> Giuseppe
Regards,
Matthew
--
Matthew White <address@hidden>
pgpmIv8uO0WFm.pgp
Description: PGP signature