Commit 1da4707f authored by Morten Welinder's avatar Morten Welinder Committed by Alexandre Julliard

Output the right number of backslashes in values.

parent 0124576c
......@@ -191,12 +191,12 @@ sub FindWindowsDir {
}
$::windir = &ToDos(dirname($winini));
print "[wine]\n";
print "\"windows\" = \"$::windir\"\n";
print "\"windows\" = ", &marshall ($::windir), "\n";
if ($::opt_sysdir) {
print "\"system\" = \"$::opt_sysdir\"\n";
print "\"system\" = ", &marshall ($::opt_sysdir), "\n";
}
else {
print "\"system\" = \"$::windir\\SYSTEM\"\n";
print "\"system\" = ", &marshall ("$::windir\\SYSTEM"), "\n";
}
}
......@@ -306,7 +306,7 @@ sub ReadAutoexecBat {
warn "exist\n";
}
}
print "\"path\" = \"" . join(";", @::DOSpathlist) . "\"\n";
print "\"path\" = ", &marshall (join (";", @::DOSpathlist)), "\n";
}
else {
# Code status: tested 1.4
......@@ -326,15 +326,15 @@ sub ReadAutoexecBat {
$command =~ s%[^/]+$%%;
$::DOSexecdir{&ToDos($command)}++;
}
print "\"path\" = \"" .
join(";",
grep(s%\\$%%,
sort {$::DOSexecdir{$b} <=> $::DOSexecdir{$a}}
(keys %::DOSexecdir))) . "\"\n";
print "\"path\" = " .
&marshall (join(";",
grep(s%\\$%%,
sort {$::DOSexecdir{$b} <=> $::DOSexecdir{$a}}
(keys %::DOSexecdir)))) . "\n";
}
if ($::DOSenv{"temp"} && -d &ToUnix($::DOSenv{"temp"})) {
print "\"temp\" = \"" . $::DOSenv{"temp"} . "\"\n";
print "\"temp\" = ", &marshall ($::DOSenv{"temp"}), "\n";
}
else {
my $TheTemp;
......@@ -351,11 +351,11 @@ sub ReadAutoexecBat {
$TheTemp = '/tmp' if (!$TheTemp && -d '/tmp');
if ($TheTemp) {
warn "Using $TheTemp\n";
print "\"temp\" = \"$TheTemp\"\n";
print "\"temp\" = ", &marshall ($TheTemp), "\n";
}
else {
warn "Using C:\\\n";
print "\"temp\" = \"C:\\\"\n";
print "\"temp\" = ", &marshall ("C:\\"), "\n";
}
}
print "\n";
......@@ -427,6 +427,13 @@ sub InsertDefaultFile {
}
}
sub marshall {
my ($s) = @_;
$s =~ s/\\/\\\\/g;
return "\"$s\"";
}
sub StandardStuff {
if (!$::opt_inifile) {
&InsertDefaultFile("./wine.ini", "wineconf");
......
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