"T. Bharath" <[EMAIL PROTECTED]> wrote
> Index: src/url.c
> ===================================================================
> diff -u -r url.c
>
> @@ -1237,21 +1237,21 @@
> /* DOS-ish file systems don't like `%' signs in them; we change it
> to `@'. */
> #ifdef WINDOWS
> {
> char *p = file;
> for (p = file; *p; p++)
> - if ((*p == '%') ||
> + if ((*p == '%') ||
> + (*p == ' " ') ||
> + (*p == '\\') ||
> + (*p == '[') ||
> + (*p == ']') ||
> + (*p == ':') ||
> + (*p == ';') ||
> + (*p == '=') ||
> + (*p == '?') ||
> + (*p == ','))
> *p = '@';
> }
> #endif /* WINDOWS */
You are testing for some perfectly legal characters in there, and you've
missed a few illegal ones. These are the illegal characters on a Windows
file system:
\ / : * ? " < > |
There's no need to make the others illegal. And wouldn't it be better to
change them to '_' than '@'? This is what I see other programs do.
Also, why is wget testing for the '%' character? I don't understand why you
are testing for WINDOWS instead of DOS in this part of the source:
/* DOS-ish file systems don't like `%' signs in them; we change it
to `@'. */
#ifdef WINDOWS
{
char *p = file;
for (p = file; *p; p++)
if (*p == '%')
*p = '@';
}
#endif /* WINDOWS */
Windows has no problems with the '%' character in file names AFAIK.