From d2e9969efbc7a6907573c71826872af6ecca3c1a Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Wed, 9 Nov 2011 23:13:51 +0000 Subject: [PATCH] Refactor Conflict() --- stow.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stow.in b/stow.in index aee5885..2110951 100755 --- a/stow.in +++ b/stow.in @@ -469,14 +469,14 @@ sub DoMkdir { sub Conflict { local($a, $b) = @_; + my $src = &JoinPaths($Stow, $a); + my $dst = &JoinPaths($Target, $b); + if ($Conflicts) { - warn sprintf("CONFLICT: %s vs. %s\n", &JoinPaths($Stow, $a), - &JoinPaths($Target, $b)); + warn "CONFLICT: $src vs. $dst\n"; + #system "ls -l $src $dst"; } else { - die sprintf("%s: CONFLICT: %s vs. %s\n", - $ProgramName, - &JoinPaths($Stow, $a), - &JoinPaths($Target, $b)); + die "$ProgramName: CONFLICT: $src vs. $dst\n"; } }