Luca wrote:
>
> > This is "feature" of Windows file system. It doesn't allow '?' in
> > filenames (nor \ / * " < >)
>
> Thanks, I thought it could have to do with unsafe characters,
> but I couldn't think of any workaround.
>
> > Use the --output-document=FILE to override the filename. This of
> > course only works for one file and not for recursive download.
>
> It works, indeed. However, unfortunately this isn't compatible with
> the other options I'll be using (-E -k -K -nh -nd -P AMG -p).
>
> > If your compiling from the sources I have a quick hack to
> > overcome this.
>
> No, I'm using Heiko's binaries. But, if this is the only way out,
> I'll go through the compile process myself, after applying your
> hack. Can you tell me more?
>
Yes, I can. I submitted it to the patches list just after answering
you. This only handles '?' and the convert-link option won't work for
these so renamed files.
Index: src/url.c
===================================================================
RCS file: /pack/anoncvs/wget/src/url.c,v
retrieving revision 1.21.2.1
diff -u -r1.21.2.1 url.c
--- src/url.c 2000/12/17 19:28:20 1.21.2.1
+++ src/url.c 2001/02/03 15:53:24
@@ -1272,16 +1272,17 @@
file = nfile;
}
}
- /* DOS-ish file systems don't like `%' signs in them; we change it
- to `@'. */
-#ifdef WINDOWS
+ /* Windows file systems don't like `?' signs in them; we change it
+ to `@'.
+ #### Note: nor are \ / : * " < > | allowed */
+#if defined(WINDOWS) || defined (__CYGWIN__)
{
char *p = file;
for (p = file; *p; p++)
- if (*p == '%')
+ if (*p == '?')
*p = '@';
}
-#endif /* WINDOWS */
+#endif /* WINDOWS or CYGWIN */
/* Check the cases in which the unique extensions are not used:
1) Clobbering is turned off (-nc).
> Thanks again.
>
You're welcome
> Best regards,
> Luca
--
Med venlig hilsen / Kind regards
Hack Kampbjørn [EMAIL PROTECTED]
HackLine +45 2031 7799