[Tools 3/3] testbot/WineRunTask: Use the modern open() to save the screenshot.
Francois Gouget
fgouget at codeweavers.com
Sun Jan 8 17:57:02 CST 2017
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/bin/WineRunTask.pl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index c3260bc1..e109874b 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -66,14 +66,14 @@ sub TakeScreenshot($$)
if (! defined($ErrMessage))
{
my $OldUMask = umask(002);
- if (open SCREENSHOT, ">$FullScreenshotFileName")
+ if (open(my $Screenshot, ">", $FullScreenshotFileName))
{
- print SCREENSHOT $ImageBytes;
- close SCREENSHOT;
+ print $Screenshot $ImageBytes;
+ close($Screenshot);
}
else
{
- Error "Can't save screenshot: $!\n";
+ Error "Could not open the screenshot file for writing: $!\n";
}
umask($OldUMask);
}
--
2.11.0
More information about the wine-patches
mailing list