From: Micah Cowan Date: Thu, 6 Dec 2007 04:56:23 +0000 (-0800) Subject: Handle --no-parent correctly when path is /. X-Git-Tag: v1.13~486 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=5114aa2d07632bdf111095b30684ea22d126825b Handle --no-parent correctly when path is /. --- diff --git a/src/ChangeLog b/src/ChangeLog index 1c02c9ce..5b04663f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-12-05 Micah Cowan + + * utils.c (subdir_p): Handle the case where d1 is "". + 2007-11-28 Micah Cowan * Makefile.am, cmpt.c, connect.c, connect.h, convert.c, diff --git a/src/utils.c b/src/utils.c index b720f7d7..042aaba9 100644 --- a/src/utils.c +++ b/src/utils.c @@ -677,6 +677,8 @@ acceptable (const char *s) bool subdir_p (const char *d1, const char *d2) { + if (*d1 == '\0') + return true; if (!opt.ignore_case) for (; *d1 && *d2 && (*d1 == *d2); ++d1, ++d2) ;