Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 01deec5

Browse files
committed
Return a value from Install.pm's lcopy function
Commit 3a7cc72 was a little over eager about adding an explicit return to this function, whose value is checked in most call sites. This change reverses that and returns the expected value explicitly. It also adds a check to the one call site lacking one.
1 parent 6a75b58 commit 01deec5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tools/msvc/Install.pm

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ sub lcopy
3737
unlink $target || confess "Could not delete $target\n";
3838
}
3939

40-
copy($src, $target)
40+
(my $retval = copy($src, $target))
4141
|| confess "Could not copy $src to $target\n";
4242

43-
return;
43+
return $retval;
4444
}
4545

4646
sub Install
@@ -200,7 +200,7 @@ sub CopyFiles
200200
print ".";
201201
$f = $basedir . $f;
202202
die "No file $f\n" if (!-f $f);
203-
lcopy($f, $target . basename($f));
203+
lcopy($f, $target . basename($f)) || croak "Could not copy $f: $!\n";
204204
}
205205
print "\n";
206206
return;

0 commit comments

Comments
 (0)