Quote .ddf content (potentially containing stuff like "%2F")

Change-Id: I532cbc97fe0a85f10dba4f52897c3744516c31c9
This commit is contained in:
Stephan Bergmann
2012-09-03 13:54:28 +02:00
parent 937b80b044
commit a297372210

View File

@@ -210,7 +210,7 @@ sub generate_cab_file_list
write_ddf_file_header(\@ddffile, $cabinetfile, $installdir);
my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
my $ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n";
if ( $doinclude ) { push(@ddffile, $ddfline); }
$counter++; # increasing the counter
@@ -230,7 +230,7 @@ sub generate_cab_file_list
my $nextfilestyles = "";
if ( $nextfile->{'Styles'} ) { $nextfilestyles = $nextfile->{'Styles'}; }
if ( $nextfilestyles =~ /\bDONT_PACK\b/ ) { $localdoinclude = 0; }
$ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
$ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n";
if ( $localdoinclude ) { push(@ddffile, $ddfline); }
$counter++; # increasing the counter!
@@ -306,7 +306,7 @@ sub generate_cab_file_list
write_ddf_file_header(\@ddffile, $cabinetfile, $installdir);
my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
my $ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n";
if ( $doinclude ) { push(@ddffile, $ddfline); }
my $nextfile = "";
@@ -327,7 +327,7 @@ sub generate_cab_file_list
my $nextfilestyles = "";
if ( $nextfile->{'Styles'} ) { $nextfilestyles = $nextfile->{'Styles'}; }
if ( $nextfilestyles =~ /\bDONT_PACK\b/ ) { $localdoinclude = 0; }
$ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
$ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n";
if ( $localdoinclude ) { push(@ddffile, $ddfline); }
$counter++;
$nextfile = "";
@@ -392,7 +392,7 @@ sub generate_cab_file_list
write_ddf_file_header(\@ddffile, $cabinetfile, $installdir);
my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
my $ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n";
if ( $doinclude ) { push(@ddffile, $ddfline); }
my $nextfile = ${$filesref}[$i+1];
@@ -411,7 +411,7 @@ sub generate_cab_file_list
my $nextfilestyles = "";
if ( $nextfile->{'Styles'} ) { $nextfilestyles = $nextfile->{'Styles'}; }
if ( $nextfilestyles =~ /\bDONT_PACK\b/ ) { $localdoinclude = 0; }
$ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
$ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n";
if ( $localdoinclude ) { push(@ddffile, $ddfline); }
$i++; # increasing the counter!
$nextfile = ${$filesref}[$i+1];
@@ -480,7 +480,7 @@ sub generate_cab_file_list
if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; };
if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; }
my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
my $ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n";
if ( $doinclude ) { push(@ddffile, $ddfline); }
$counter++; # increasing the counter
@@ -538,7 +538,7 @@ sub generate_cab_file_list
if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; };
if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; }
my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
my $ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n";
if ( $doinclude ) { push(@ddffile, $ddfline); }
}
@@ -616,7 +616,7 @@ sub save_packorder
if ( $oneline =~ /^\s*\.Set\s+CabinetName.*\=(.*?)\s*$/ ) { $cabinetfile = $1; }
if ( $oneline =~ /^\s*\.Set\s+/ ) { next; }
if ( $oneline =~ /^\s*\"(.*?)\"\s+(.*?)\s*$/ )
if ( $oneline =~ /^\s*\"(.*?)\"\s+\"(.*?)\"\s*$/ )
{
my $sourcefile = $1;
my $uniquefilename = $2;