mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Return a value from Install.pm's lcopy function
Commit 3a7cc727c
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.
This commit is contained in:
parent
6a75b58065
commit
01deec5f8a
@ -37,10 +37,10 @@ sub lcopy
|
||||
unlink $target || confess "Could not delete $target\n";
|
||||
}
|
||||
|
||||
copy($src, $target)
|
||||
(my $retval = copy($src, $target))
|
||||
|| confess "Could not copy $src to $target\n";
|
||||
|
||||
return;
|
||||
return $retval;
|
||||
}
|
||||
|
||||
sub Install
|
||||
@ -200,7 +200,7 @@ sub CopyFiles
|
||||
print ".";
|
||||
$f = $basedir . $f;
|
||||
die "No file $f\n" if (!-f $f);
|
||||
lcopy($f, $target . basename($f));
|
||||
lcopy($f, $target . basename($f)) || croak "Could not copy $f: $!\n";
|
||||
}
|
||||
print "\n";
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user