Module Name: src
Committed By: maya
Date: Wed Aug 3 12:33:56 UTC 2016
Modified Files:
src/usr.bin/ftp: fetch.c
Log Message:
Do globbing for FTP URLs of the form ftp://... too
ok christos
To generate a diff of this commit:
cvs rdiff -u -r1.223 -r1.224 src/usr.bin/ftp/fetch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.223 src/usr.bin/ftp/fetch.c:1.224
--- src/usr.bin/ftp/fetch.c:1.223 Mon Apr 4 23:59:41 2016
+++ src/usr.bin/ftp/fetch.c Wed Aug 3 12:33:56 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.223 2016/04/04 23:59:41 christos Exp $ */
+/* $NetBSD: fetch.c,v 1.224 2016/08/03 12:33:56 maya Exp $ */
/*-
* Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.223 2016/04/04 23:59:41 christos Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.224 2016/08/03 12:33:56 maya Exp $");
#endif /* not lint */
/*
@@ -1899,7 +1899,8 @@ fetch_ftp(const char *url)
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)