# ex:ts=8 sw=4:
-# $OpenBSD: Delete.pm,v 1.164 2022/06/06 07:57:21 espie Exp $
+# $OpenBSD: Delete.pm,v 1.165 2022/06/09 09:27:11 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
sub delete
{
my ($self, $state) = @_;
+ return if defined $state->{current_set}{known_extra}{$self->fullname};
my $realname = $self->realname($state);
if ($state->verbose >= 2 && $state->{extra}) {
$state->say("deleting extra file: #1", $realname);
}
return if $state->{not};
return unless -e $realname or -l $realname;
- if ($state->replacing) {
- $state->log("Remember to update #1", $realname);
- $self->mark_dir($state);
- } elsif ($state->{extra}) {
+ if ($state->{extra}) {
unlink($realname) or
$state->say("problem deleting extra file #1: #2", $realname, $!);
} else {
{
my ($self, $state) = @_;
return unless $state->{extra};
+ return if defined $state->{current_set}{known_extra}{$self->fullname};
my $realname = $self->realname($state);
- return if $state->replacing;
if ($state->{extra}) {
$self->SUPER::delete($state);
} else {