Commit 3fafafa9 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Files with special characters may not have been renamed. Try to match

both forms.
parent faa35949
...@@ -1127,10 +1127,20 @@ sub search_from ...@@ -1127,10 +1127,20 @@ sub search_from
$dirname=dirname($dirname) . "/"; $dirname=dirname($dirname) . "/";
$real_path.="../"; $real_path.="../";
} else { } 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 $directory=get_directory_contents $dirname;
my $found; my $found;
foreach $dentry (@$directory) { foreach $dentry (@$directory) {
if ($dentry =~ /^$component$/i) { if ($dentry =~ /^$component$/i or
(defined $renamed and $dentry =~ /^$renamed$/i)
) {
$dirname.="$dentry/"; $dirname.="$dentry/";
$real_path.="$dentry/"; $real_path.="$dentry/";
$found=1; $found=1;
...@@ -1175,14 +1185,12 @@ sub get_real_include_name ...@@ -1175,14 +1185,12 @@ sub get_real_include_name
} }
} else { } else {
# Here's how we proceed: # Here's how we proceed:
# - compute the 'renamed' filename (see renaming phase)
# - split the filename we look for into its components # - split the filename we look for into its components
# - then for each directory in the include path # - then for each directory in the include path
# - trace the directory components starting from that directory # - trace the directory components starting from that directory
# - if we fail to find a match at any point then continue with # - if we fail to find a match at any point then continue with
# the next directory in the include path # the next directory in the include path
# - otherwise, rejoice, our quest is over. # - otherwise, rejoice, our quest is over.
$filename =~ s/[ \$]/_/g;
my @file_components=split /[\/\\]+/, $filename; my @file_components=split /[\/\\]+/, $filename;
#print " Searching for $filename from @$project[$P_PATH]\n"; #print " Searching for $filename from @$project[$P_PATH]\n";
...@@ -1583,7 +1591,7 @@ sub generate_spec_file ...@@ -1583,7 +1591,7 @@ sub generate_spec_file
} }
my $rcname=@{@$target[$T_SOURCES_RC]}[0]; my $rcname=@{@$target[$T_SOURCES_RC]}[0];
$rcname =~ s+\.rc$++i; $rcname =~ s+\.rc$++i;
$rcname =~ s+([^/\w])+\\\1+g; $rcname =~ s+([^/\w])+\\$1+g;
print FILEO "rsrc $rcname.res\n"; print FILEO "rsrc $rcname.res\n";
} }
print FILEO "\n"; print FILEO "\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment