Skip to content

Commit bdf6b88

Browse files
committed
More detailed error msg (with stack trace) if a file copy fails.
1 parent fa8a9f3 commit bdf6b88

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/tools/msvc/Install.pm

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package Install;
33
#
44
# Package that provides 'make install' functionality for msvc builds
55
#
6-
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.22 2007/09/27 21:13:11 adunstan Exp $
6+
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.23 2007/10/03 13:20:40 mha Exp $
77
#
88
use strict;
99
use warnings;
@@ -22,9 +22,14 @@ sub lcopy
2222
my $src = shift;
2323
my $target = shift;
2424

25-
unlink $target if -f $target;
25+
if (-f $target)
26+
{
27+
unlink $target || confess "Could not delete $target\n";
28+
}
29+
30+
copy($src,$target)
31+
|| confess "Could not copy $src to $target\n";
2632

27-
copy($src,$target);
2833
}
2934

3035
sub Install
@@ -123,8 +128,7 @@ sub CopyFiles
123128
print ".";
124129
$f = $basedir . $f;
125130
die "No file $f\n" if (!-f $f);
126-
lcopy($f, $target . basename($f))
127-
|| croak "Could not copy $f to $target". basename($f). " to $target". basename($f) . "\n";
131+
lcopy($f, $target . basename($f));
128132
}
129133
print "\n";
130134
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy