Files with special characters may not have been renamed. Try to match
both forms.
This commit is contained in:
parent
faa359492b
commit
3fafafa937
|
@ -1127,10 +1127,20 @@ sub search_from
|
|||
$dirname=dirname($dirname) . "/";
|
||||
$real_path.="../";
|
||||
} else {
|
||||
# The file/directory may have been renamed before. Also try to
|
||||
# match the renamed file.
|
||||
my $renamed=$component;
|
||||
$renamed =~ s/[ \$]/_/g;
|
||||
if ($renamed eq $component) {
|
||||
undef $renamed;
|
||||
}
|
||||
|
||||
my $directory=get_directory_contents $dirname;
|
||||
my $found;
|
||||
foreach $dentry (@$directory) {
|
||||
if ($dentry =~ /^$component$/i) {
|
||||
if ($dentry =~ /^$component$/i or
|
||||
(defined $renamed and $dentry =~ /^$renamed$/i)
|
||||
) {
|
||||
$dirname.="$dentry/";
|
||||
$real_path.="$dentry/";
|
||||
$found=1;
|
||||
|
@ -1175,14 +1185,12 @@ sub get_real_include_name
|
|||
}
|
||||
} else {
|
||||
# Here's how we proceed:
|
||||
# - compute the 'renamed' filename (see renaming phase)
|
||||
# - split the filename we look for into its components
|
||||
# - then for each directory in the include path
|
||||
# - trace the directory components starting from that directory
|
||||
# - if we fail to find a match at any point then continue with
|
||||
# the next directory in the include path
|
||||
# - otherwise, rejoice, our quest is over.
|
||||
$filename =~ s/[ \$]/_/g;
|
||||
my @file_components=split /[\/\\]+/, $filename;
|
||||
#print " Searching for $filename from @$project[$P_PATH]\n";
|
||||
|
||||
|
@ -1583,7 +1591,7 @@ sub generate_spec_file
|
|||
}
|
||||
my $rcname=@{@$target[$T_SOURCES_RC]}[0];
|
||||
$rcname =~ s+\.rc$++i;
|
||||
$rcname =~ s+([^/\w])+\\\1+g;
|
||||
$rcname =~ s+([^/\w])+\\$1+g;
|
||||
print FILEO "rsrc $rcname.res\n";
|
||||
}
|
||||
print FILEO "\n";
|
||||
|
|
Loading…
Reference in New Issue