summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-07-03 01:52:10 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-07-03 01:52:10 +0000
commitd32a285ec16c17b59f193d5dc8b1a164bd1f1bcb (patch)
tree9d241e583b87986d095430486cfbb58eaa7cf194 /usr.sbin
parent63999c56f37323d1a33864aed0c85b8c1258b4ff (diff)
we can't checksum directories either, so give a better error message
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index db2df070d44..1ce356fbdbe 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.19 2010/06/30 10:51:04 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.20 2010/07/03 01:52:09 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -181,6 +181,8 @@ sub compute_checksum
$result->add_digest($self->compute_digest($fname));
$result->add_size($size);
}
+ } elsif (-d _) {
+ $state->error("#1 should be a file and not a directory", $fname);
} else {
$state->error("#1 does not exist", $fname);
}