summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_delete
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2003-11-03 11:05:56 +0000
committerMarc Espie <espie@cvs.openbsd.org>2003-11-03 11:05:56 +0000
commit7d30ae21efe84b97d4a9b33fb4a6be50a2afa0fd (patch)
tree5e6f12640d6a547666cecc05ce519c32c40d6ed6 /usr.sbin/pkg_add/pkg_delete
parent14df85a782a060c4fa7eee05af15b57220a627f9 (diff)
canonpath strips ending /, rely on unstripped name for @extra.
found out by naddy@
Diffstat (limited to 'usr.sbin/pkg_add/pkg_delete')
-rw-r--r--usr.sbin/pkg_add/pkg_delete4
1 files changed, 2 insertions, 2 deletions
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";
}