From 7d30ae21efe84b97d4a9b33fb4a6be50a2afa0fd Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Mon, 3 Nov 2003 11:05:56 +0000 Subject: canonpath strips ending /, rely on unstripped name for @extra. found out by naddy@ --- usr.sbin/pkg_add/pkg_delete | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/pkg_add/pkg_delete') diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index 0fada87788b..dfbdccbf349 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.7 2003/11/03 11:04:21 espie Exp $ +# $OpenBSD: pkg_delete,v 1.8 2003/11/03 11:05:55 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -156,7 +156,7 @@ sub delete my ($self, $state) = @_; return unless $state->{extra}; my $name = $self->fullname(); - if ($name =~ s|/$||) { + if ($self->{name} =~ m|/$|) { if ($state->{verbose} or $state->{not}) { print "deleting extra directory: $name\n"; } -- cgit v1.2.3