diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-11-12 22:48:32 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-11-12 22:48:32 +0000 |
commit | 9deff8ec7d9e2081ac2456a2d544fb25dd708da2 (patch) | |
tree | e9fda9231494d27cf4edfcf9c142949361927ebf /usr.sbin/pkg_add | |
parent | 3089137f0a9cbb0d791fc04b04a831abc585978c (diff) |
stop storing fullname, recompute it dynamically instead.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 1d1f44d0f22..6bf689b5f53 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingElement.pm,v 1.65 2004/11/12 22:39:40 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.66 2004/11/12 22:48:31 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -155,22 +155,22 @@ sub compute_fullname my ($self, $state, $absolute_okay) = @_; $self->{cwd} = $state->{cwd}; - my $fullname = $self->{name}; - if ($fullname =~ m|^/|) { + if ($self->{name} =~ m|^/|) { unless ($absolute_okay) { - die "Absolute name forbidden: $fullname"; + die "Absolute name forbidden: ", $self->{name}; } - } else { - $fullname = $self->{cwd}."/".$fullname; } - $fullname = File::Spec->canonpath($fullname); - $self->{fullname} = $fullname; - return $fullname; } sub fullname($) { - return $_[0]->{fullname}; + my $self = $_[0]; + my $fullname = $self->{name}; + unless ($fullname =~ m|^/|) { + $fullname = $self->{cwd}."/".$fullname; + } + $fullname = File::Spec->canonpath($fullname); + return $fullname; } sub compute_modes |