added test for directory
authoreck <none@none>
Tue, 6 Mar 1990 13:10:35 +0000 (13:10 +0000)
committereck <none@none>
Tue, 6 Mar 1990 13:10:35 +0000 (13:10 +0000)
util/arch/archiver.c

index f5cbf94..7b1c2b6 100644 (file)
@@ -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;