1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Use Gnulib's quote function in cookies.c.

This commit is contained in:
Steven Schubiger 2008-04-16 11:57:19 +02:00
parent 5116620aa8
commit 0edf98a6d9
2 changed files with 9 additions and 8 deletions

View File

@ -4,6 +4,7 @@
such.
* connect.c: Likewise.
* convert.c: Likewise.
* cookies.c: Likewise.
2008-04-16 Steven Schubiger <schubiger@gmail.com>

View File

@ -1129,8 +1129,8 @@ cookie_jar_load (struct cookie_jar *jar, const char *file)
FILE *fp = fopen (file, "r");
if (!fp)
{
logprintf (LOG_NOTQUIET, _("Cannot open cookies file `%s': %s\n"),
file, strerror (errno));
logprintf (LOG_NOTQUIET, _("Cannot open cookies file %s: %s\n"),
quote (file), strerror (errno));
return;
}
cookies_now = time (NULL);
@ -1247,8 +1247,8 @@ cookie_jar_save (struct cookie_jar *jar, const char *file)
fp = fopen (file, "w");
if (!fp)
{
logprintf (LOG_NOTQUIET, _("Cannot open cookies file `%s': %s\n"),
file, strerror (errno));
logprintf (LOG_NOTQUIET, _("Cannot open cookies file %s: %s\n"),
quote (file), strerror (errno));
return;
}
@ -1284,11 +1284,11 @@ cookie_jar_save (struct cookie_jar *jar, const char *file)
}
out:
if (ferror (fp))
logprintf (LOG_NOTQUIET, _("Error writing to `%s': %s\n"),
file, strerror (errno));
logprintf (LOG_NOTQUIET, _("Error writing to %s: %s\n"),
quote (file), strerror (errno));
if (fclose (fp) < 0)
logprintf (LOG_NOTQUIET, _("Error closing `%s': %s\n"),
file, strerror (errno));
logprintf (LOG_NOTQUIET, _("Error closing %s: %s\n"),
quote (file), strerror (errno));
DEBUGP (("Done saving cookies.\n"));
}