mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
58b668c714
commit
6026fef35e
1 changed files with 2 additions and 2 deletions
|
@ -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($_);
|
||||
|
|
Loading…
Reference in a new issue