[tools] testbot/SetWinLocale: Simplify sending the Powershell script.
Francois Gouget
fgouget at codeweavers.com
Wed Feb 16 13:10:30 CST 2022
Converting the line endings to CR+LF is not needed.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
Also it's a Powershell script, not a batch file.
testbot/bin/SetWinLocale | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale
index 29b57b30f8..94e2f49404 100755
--- a/testbot/bin/SetWinLocale
+++ b/testbot/bin/SetWinLocale
@@ -663,20 +663,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 GetWinSettings()
--
2.30.2
More information about the wine-devel
mailing list