Converting the line endings to CR+LF is not needed.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- v2: Rediffed. I think v1 failed to apply because GetWinProperties() took the place of GetWinSettings(). --- testbot/bin/SetWinLocale | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale index 73c774e6e4..670de46043 100755 --- a/testbot/bin/SetWinLocale +++ b/testbot/bin/SetWinLocale @@ -662,20 +662,9 @@ sub RegGetValue($;$) # Show the host's locale settings #
-if (open(my $fh, "<", "$0.ps1")) +if (!$TA->SendFile("$0.ps1", "$name0.ps1", 0)) { - my $Script = join("", <$fh>); - close($fh); - - $Script =~ s~\n~\r\n~g; - if (!$TA->SendFileFromString($Script, "$name0.ps1", 0)) - { - FatalError("could not send the batch file:", $TA->GetLastError(), "\n"); - } -} -else -{ - FatalError("could not open '$0.ps1' for reading: $!\n"); + FatalError("could not send the Powershell script:", $TA->GetLastError(), "\n"); }
sub GetWinProperties($)