From 5114aa2d07632bdf111095b30684ea22d126825b Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Wed, 5 Dec 2007 20:56:23 -0800 Subject: [PATCH] Handle --no-parent correctly when path is /. --- src/ChangeLog | 4 ++++ src/utils.c | 2 ++ 2 files changed, 6 insertions(+) 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) ;