summaryrefslogtreecommitdiffstats
path: root/scripts/win-ldd.pl
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2013-10-11 20:39:56 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-12 10:30:00 -0700
commit6026fef35e106fb8e6c2572ebda5dac4487c25d7 (patch)
tree3bdeb2ffccbe6514739a10b8b74dc872dfeda434 /scripts/win-ldd.pl
parent58b668c714223bf7ab1164f27353fb49a38ada40 (diff)
downloadsubsurface-6026fef35e106fb8e6c2572ebda5dac4487c25d7.tar.gz
Fix two issues with directory searches on Windows
First, make sure we actually match /c/windows from the beginning, not if it occurs in the middle of the path. Second, make sure that directories containing the binaries are searched first. Do that by using unshift (prepend) instead of push (append). Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/win-ldd.pl')
-rw-r--r--scripts/win-ldd.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/win-ldd.pl b/scripts/win-ldd.pl
index 07ea7ea95..e3aa505de 100644
--- a/scripts/win-ldd.pl
+++ b/scripts/win-ldd.pl
@@ -3,7 +3,7 @@ use strict;
my %deploy;
my $objdump = $ENV{objdump} ? $ENV{objdump} : "objdump";
my @searchdirs;
-my @systemdirs = (qr|^c:/windows|i, qr|^c:/winnt|i, qr|/c/windows|i, qr|/c/winnt|);
+my @systemdirs = (qr|^c:/windows|i, qr|^c:/winnt|i, qr|^/c/windows|i, qr|^/c/winnt|);
sub addDependenciesFor($) {
open OBJDUMP, "-|", $objdump, "-p", $_[0] or die;
@@ -50,7 +50,7 @@ for (@ARGV) {
# Add $_'s path to the search list too
my $dirname = $_;
$dirname =~ s,/[^/]+$,,;
- push @searchdirs, $dirname;
+ unshift @searchdirs, $dirname;
$deploy{$_} = $_;
addDependenciesFor($_);