提交 bdf6b888 编写于 作者: M Magnus Hagander

More detailed error msg (with stack trace) if a file copy fails.

上级 fa8a9f37
......@@ -3,7 +3,7 @@ package Install;
#
# Package that provides 'make install' functionality for msvc builds
#
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.22 2007/09/27 21:13:11 adunstan Exp $
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.23 2007/10/03 13:20:40 mha Exp $
#
use strict;
use warnings;
......@@ -22,9 +22,14 @@ sub lcopy
my $src = shift;
my $target = shift;
unlink $target if -f $target;
if (-f $target)
{
unlink $target || confess "Could not delete $target\n";
}
copy($src,$target)
|| confess "Could not copy $src to $target\n";
copy($src,$target);
}
sub Install
......@@ -123,8 +128,7 @@ sub CopyFiles
print ".";
$f = $basedir . $f;
die "No file $f\n" if (!-f $f);
lcopy($f, $target . basename($f))
|| croak "Could not copy $f to $target". basename($f). " to $target". basename($f) . "\n";
lcopy($f, $target . basename($f));
}
print "\n";
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册