ftp(1) doesn't glob on ftp://..., patch.
[email protected] Sat, 30 Jul 2016 20:00:37 +0000
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Message-ID | <[email protected]> |
Now ftp ftp://ftp.netbsd.org/robots* doesn't work (FTP_URL_T) Wheras ftp ftp.netbsd.org:/robots* does (CLASSIC_URL_T) I don't feel comfortable just doing it because there might be a reason not to, and I haven't read the RFC or whatever. Patch works. Thanks.
ftp.diff
(text/plain, 644 B)
Index: fetch.c
===================================================================
RCS file: /cvsroot/src/usr.bin/ftp/fetch.c,v
retrieving revision 1.223
diff -u -r1.223 fetch.c
--- fetch.c 4 Apr 2016 23:59:41 -0000 1.223
+++ fetch.c 28 Jul 2016 17:13:57 -0000
@@ -1899,7 +1899,8 @@
STRorNULL(ui.path), STRorNULL(dir), STRorNULL(file));
dirhasglob = filehasglob = 0;
- if (doglob && ui.utype == CLASSIC_URL_T) {
+ if (doglob &&
+ (ui.utype == CLASSIC_URL_T || ui.utype == FTP_URL_T)) {
if (! EMPTYSTRING(dir) && strpbrk(dir, "*?[]{}") != NULL)
dirhasglob = 1;
if (! EMPTYSTRING(file) && strpbrk(file, "*?[]{}") != NULL)