Skip to content

Commit d692522

Browse files
committed
MSVC: Future-proof installation file skip logic.
This code relied on knowing exactly where in the source tree temporary installations might appear. A reasonable hacker may not think to update this code when adding use of a temporary installation, making it fragile. Observe that commit 9fa8b0e broke it unnoticed, and commit dcae5fa fixed it unnoticed. Back-patch to 9.5 only; use of temporary installations is unlikely to change in released versions.
1 parent 2cd40ad commit d692522

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/tools/msvc/Install.pm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ sub Install
9898
{ wanted => sub {
9999
/^.*\.sample\z/s
100100
&& push(@$sample_files, $File::Find::name);
101+
102+
# Don't find files of in-tree temporary installations.
103+
$_ eq 'share' and $File::Find::prune = 1;
101104
}
102105
},
103106
@top_dir);
@@ -152,6 +155,9 @@ sub Install
152155
{ wanted => sub {
153156
/^(.*--.*\.sql|.*\.control)\z/s
154157
&& push(@$pl_extension_files, $File::Find::name);
158+
159+
# Don't find files of in-tree temporary installations.
160+
$_ eq 'share' and $File::Find::prune = 1;
155161
}
156162
},
157163
@pldirs);
@@ -199,8 +205,6 @@ sub CopySetOfFiles
199205
print "Copying $what" if $what;
200206
foreach (@$flist)
201207
{
202-
next if /regress/; # Skip temporary install in regression subdir
203-
next if /ecpg.test/; # Skip temporary install in regression subdir
204208
my $tgt = $target . basename($_);
205209
print ".";
206210
lcopy($_, $tgt) || croak "Could not copy $_: $!\n";

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