From a771c9aa300a8e69617b3f7c847e549b39ebf169 Mon Sep 17 00:00:00 2001 From: eck Date: Tue, 6 Mar 1990 13:10:35 +0000 Subject: [PATCH] added test for directory --- util/arch/archiver.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.34.1