Francois Gouget : testbot/SetWinLocale: Simplify sending the Powershell script.

Alexandre Julliard julliard at winehq.org
Thu Feb 17 15:31:28 CST 2022


Module: tools
Branch: master
Commit: c255804dc5e16ad2123d52f23b37811a24dc3f0b
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=c255804dc5e16ad2123d52f23b37811a24dc3f0b

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Feb 17 10:16:03 2022 +0100

testbot/SetWinLocale: Simplify sending the Powershell script.

Converting the line endings to CR+LF is not needed.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/bin/SetWinLocale | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale
index 73c774e..670de46 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($)




More information about the wine-cvs mailing list