[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #61755] --unlink doesn't
From: |
anonymous |
Subject: |
[bug #61755] --unlink doesn't |
Date: |
Sun, 9 Jan 2022 06:55:23 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.10.2 |
Follow-up Comment #2, bug #61755 (project wget):
Apparently the suspect code is here:
https://git.savannah.gnu.org/cgit/wget.git/tree/src/http.c#n2528
unlink_requested is supposed to be set when --unlink is passed.
static uerr_t
open_output_stream (struct http_stat *hs, int count, FILE **fp)
{
...
# define FOPEN_BIN_FLAG true
...
/* Open the local file. */
if (!output_stream)
{
mkalldirs (hs->local_file);
if (opt.backups)
rotate_backups (hs->local_file);
if (hs->restval)
{
...
*fp = fopen (hs->local_file, "ab");
...
}
else if (ALLOW_CLOBBER || count > 0)
{
if (opt.unlink_requested && file_exists_p (hs->local_file, NULL))
{
if (unlink (hs->local_file) < 0)
{
logprintf (LOG_NOTQUIET, "%s: %s\n", hs->local_file,
strerror (errno));
return UNLINKERR;
}
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61755>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/