diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-11-13 11:48:47 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-11-13 11:48:47 +0000 |
commit | 36b86cf7488c3abcd7c043b7b876b446e780c618 (patch) | |
tree | 389204beed4cf70e424d3ca81e7b7a752de8b345 /usr.sbin/pkg_add/OpenBSD/PackingElement.pm | |
parent | c653ebfbb06a735a5a647944357f87313acff6ef (diff) |
likewise, packing-lists state will store refs to cwd, so make this
a true object with cwd()/set_cwd() functions.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 4a23f816f6e..5632b077dc7 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.69 2004/11/13 11:39:40 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.70 2004/11/13 11:48:46 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -839,8 +839,7 @@ sub keyword() { 'cwd' } sub destate { my ($self, $state) = @_; - my $name = File::Spec->canonpath($self->{name}); - $state->{cwd} = \$name; + $state->set_cwd($self->{name}); } package OpenBSD::PackingElement::EndFake; @@ -947,7 +946,7 @@ sub expand } if (m/\%D/) { die "Bad expand" unless defined $state->{cwd}; - s/\%D/${$state->{cwd}}/g; + s/\%D/$state->cwd()/ge; } if (m/\%B/) { die "Bad expand" unless defined $state->{lastfile}; |