"Tony Lewis" <[EMAIL PROTECTED]> writes:

> Mauro Tortonesi wrote: 
>
>> this is a very interesting point, but the patch you mentioned above uses
> the
>> LIST -a FTP command, which AFAIK is not supported by all FTP servers.
>
> As I recall, that's why the patch was not accepted. However, it would be
> useful if there were some command line option to affect the LIST parameters.
> Perhaps something like:
>
> wget ftp://ftp.somesite.com --ftp-list="-a"

I wrote a similar patch and posted it wget-patches, but I wasn't
convinced that it was the best approach for this.  Here it is, for
reference:

Index: src/ftp.c
===================================================================
RCS file: /pack/anoncvs/wget/src/ftp.c,v
retrieving revision 1.105
diff -u -r1.105 ftp.c
--- src/ftp.c   2005/05/16 12:41:29     1.105
+++ src/ftp.c   2005/05/16 19:48:36
@@ -857,7 +857,7 @@
       /* As Maciej W. Rozycki ([EMAIL PROTECTED]) says, `LIST'
         without arguments is better than `LIST .'; confirmed by
         RFC959.  */
-      err = ftp_list (csock, NULL);
+      err = ftp_list (csock, opt.list_options);
       /* FTPRERR, WRITEFAILED */
       switch (err)
        {
Index: src/init.c
===================================================================
RCS file: /pack/anoncvs/wget/src/init.c,v
retrieving revision 1.115
diff -u -r1.115 init.c
--- src/init.c  2005/05/16 15:09:07     1.115
+++ src/init.c  2005/05/16 19:48:39
@@ -182,6 +182,7 @@
   { "keepsessioncookies", &opt.keep_session_cookies, cmd_boolean },
   { "killlonger",      &opt.kill_longer,       cmd_boolean },
   { "limitrate",       &opt.limit_rate,        cmd_bytes },
+  { "listoptions",     &opt.list_options,      cmd_string },
   { "loadcookies",     &opt.cookies_input,     cmd_file },
   { "logfile",         &opt.lfilename,         cmd_file },
   { "login",           &opt.ftp_user,          cmd_string },/* deprecated*/
Index: src/main.c
===================================================================
RCS file: /pack/anoncvs/wget/src/main.c,v
retrieving revision 1.137
diff -u -r1.137 main.c
--- src/main.c  2005/05/06 15:50:50     1.137
+++ src/main.c  2005/05/16 19:48:42
@@ -211,6 +211,7 @@
     { "keep-session-cookies", 0, OPT_BOOLEAN, "keepsessioncookies", -1 },
     { "level", 'l', OPT_VALUE, "reclevel", -1 },
     { "limit-rate", 0, OPT_VALUE, "limitrate", -1 },
+    { "list-options", 0, OPT_VALUE, "listoptions", -1 },
     { "load-cookies", 0, OPT_VALUE, "loadcookies", -1 },
     { "mirror", 'm', OPT_BOOLEAN, "mirror", -1 },
     { "no", 'n', OPT__NO, NULL, required_argument },
Index: src/options.h
===================================================================
RCS file: /pack/anoncvs/wget/src/options.h,v
retrieving revision 1.52
diff -u -r1.52 options.h
--- src/options.h       2005/04/27 21:30:22     1.52
+++ src/options.h       2005/05/16 19:48:43
@@ -219,6 +219,8 @@
     prefer_none
   } prefer_family;             /* preferred address family when more
                                   than one type is available */
+
+  char *list_options;
 };
 
 extern struct options opt;

Reply via email to