testbot/WineRunTask: Make it possible to use the standard 'Name <address>' syntax for the admnistrator.

Francois Gouget fgouget at codeweavers.com
Sun Mar 24 17:39:29 CDT 2013


---
 testbot/bin/WineRunTask.pl |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 57a4537..bcfda06 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -278,11 +278,15 @@ elsif ($Step->Type eq "suite")
       $Info .= ": " if ($Info ne "");
       $Info .=  $VM->Details;
   }
-  # Escape the info argument for cmd's command interpreter
-  $Info =~ s/\\/\\\\/g;
+  # Escape the arguments for cmd's command interpreter
+  my $EMail = $AdminEMail;
+  $EMail =~ s/"/\\"/g;
+  $EMail =~ s/%/%%/g;
+  $EMail =~ s/%/%%/g;
   $Info =~ s/"/\\"/g;
   $Info =~ s/%/%%/g;
-  $Script .= "-q -o $RptFileName -t $Tag -m $AdminEMail -i \"$Info\"\r\n" .
+  $Info =~ s/%/%%/g;
+  $Script .= "-q -o $RptFileName -t $Tag -m \"$EMail\" -i \"$Info\"\r\n" .
              "$FileName -q -s $RptFileName\r\n";
 }
 if (!$TA->SendFileFromString($Script, "script.bat", $TestAgent::SENDFILE_EXE))
-- 
1.7.10.4




More information about the wine-patches mailing list