diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-09-20 07:31:43 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-09-20 07:31:43 +0000 |
commit | a3fa5d4a2a09156424aaf4cd2a8d2474099a3665 (patch) | |
tree | e727e7fdc99f95f095e4ac3008d4dedc9091206c | |
parent | 01db445bafbbd7d7d9e2e2f1efa75514f7f4332f (diff) |
use fullname() in sample, so that absolute names AND relative names work.
problem noticed by sturm@
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index 472bb551cd7..c7205c1d216 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.56 2004/09/18 13:28:19 espie Exp $ +# $OpenBSD: pkg_add,v 1.57 2004/09/20 07:31:42 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -111,7 +111,7 @@ sub install { my ($self, $archive, $destdir, $verbose, $not) = @_; - my $filename = $destdir.$self->{name}; + my $filename = $destdir.$self->fullname(); my $orig = $self->{copyfrom}; if (!defined $orig) { die "\@sample element does not reference a valid file\n"; diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index 9338f85ffcf..5e7961c08db 100644 --- a/usr.sbin/pkg_add/pkg_delete +++ b/usr.sbin/pkg_add/pkg_delete @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_delete,v 1.43 2004/09/18 09:27:05 espie Exp $ +# $OpenBSD: pkg_delete,v 1.44 2004/09/20 07:31:42 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -208,7 +208,7 @@ use OpenBSD::md5; sub delete { my ($self, $state) = @_; - my $name = $self->{name}; + my $name = $self->fullname(); my $realname = $state->{destdir}.$name; my $orig = $self->{copyfrom}; |