From: eck Date: Tue, 6 Mar 1990 13:10:35 +0000 (+0000) Subject: added test for directory X-Git-Tag: release-5-5~1793 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a771c9aa300a8e69617b3f7c847e549b39ebf169;p=ack.git added test for directory --- diff --git a/util/arch/archiver.c b/util/arch/archiver.c index f5cbf9452..7b1c2b6fe 100644 --- a/util/arch/archiver.c +++ b/util/arch/archiver.c @@ -415,6 +415,10 @@ char *mess; error(FALSE, "cannot find %s\n", name); return; } + else if (status.st_mode & S_IFDIR) { + error(FALSE, "%s is a directory (ignored)\n", name); + return; + } else if ((src_fd = open(name, 0)) < 0) { error(FALSE, "cannot open %s\n", name); return;