Francois Gouget : testbot/WineRunTask: Use the modern open() to save the screenshot.
Alexandre Julliard
julliard at winehq.org
Mon Jan 9 05:43:41 CST 2017
Module: tools
Branch: master
Commit: 42559042033e7e8b9b31ef8cdc0e5eb3e598259c
URL: http://source.winehq.org/git/tools.git/?a=commit;h=42559042033e7e8b9b31ef8cdc0e5eb3e598259c
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Jan 9 00:57:02 2017 +0100
testbot/WineRunTask: Use the modern open() to save the screenshot.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 c3260bc..e109874 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);
}
More information about the wine-cvs
mailing list