From 4272e7c4bba7b38f0468cbeb35e72388f5d49715 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Mon, 1 Apr 2024 21:26:21 +0100 Subject: [PATCH] unstow_link_node: rename $existing_source => $link_dest The use of the word "source" to describe a link's destination is confusing in the context of Stow for reasons explained in the manual. So rename the $existing_source variable to $link_dest avoid this. --- lib/Stow.pm.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Stow.pm.in b/lib/Stow.pm.in index 45fad24..67fd2b1 100755 --- a/lib/Stow.pm.in +++ b/lib/Stow.pm.in @@ -828,19 +828,19 @@ sub unstow_link_node { debug(4, 2, "Evaluate existing link: $target_subpath"); # Where is the link pointing? - my $existing_source = $self->read_a_link($target_subpath); - if (not $existing_source) { + my $link_dest = $self->read_a_link($target_subpath); + if (not $link_dest) { error("Could not read link: $target_subpath"); } - if ($existing_source =~ m{\A/}) { - warn "Ignoring an absolute symlink: $target_subpath => $existing_source\n"; + if ($link_dest =~ m{\A/}) { + warn "Ignoring an absolute symlink: $target_subpath => $link_dest\n"; return; # XXX # } # Does it point to a node under any stow directory? my ($existing_path, $existing_stow_path, $existing_package) = - $self->find_stowed_path($target_subpath, $existing_source); + $self->find_stowed_path($target_subpath, $link_dest); if (not $existing_path) { if ($self->{compat}) { # We're traversing the target tree not the package tree, @@ -852,7 +852,7 @@ sub unstow_link_node { $self->conflict( 'unstow', $package, - "existing target is not owned by stow: $target_subpath => $existing_source" + "existing target is not owned by stow: $target_subpath => $link_dest" ); } return;