Re: Will FTP mirroring be fixed, ever?

Hrvoje Niksic <[email protected]> Mon, 16 May 2005 21:49:24 +0200
Newsgroups gmane.comp.web.wget.patches
Message-ID <[email protected]>
B Wooster <[email protected]> writes:

> This is exactly what "pavuk" does - I've just started to look into
> that as a wget replacement.  If wget could add a "--ftp_list_option
> <string>" argument, it would solve this problem for those who need
> it.

If you really need it right now, use this patch, which adds a
"--list-options" flag with which you can specify --list-options=-al.
I don't plan to apply it to Wget because I hope to implement this
feature in a better way.

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;