Francois Gouget : testbot/WineRun*: Simplify umask handling in the WineRun* scripts.
Alexandre Julliard
julliard at winehq.org
Mon Jan 9 05:43:41 CST 2017
Module: tools
Branch: master
Commit: 0d51b110ac80b5689d7481cd421a06023daec768
URL: http://source.winehq.org/git/tools.git/?a=commit;h=0d51b110ac80b5689d7481cd421a06023daec768
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Jan 9 00:56:52 2017 +0100
testbot/WineRun*: Simplify umask handling in the WineRun* scripts.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/bin/WineRunBuild.pl | 3 +--
testbot/bin/WineRunReconfig.pl | 3 +--
testbot/bin/WineRunTask.pl | 6 ++----
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index 0757247..119b988 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -180,15 +180,14 @@ sub LogTaskError($)
my $OldUMask = umask(002);
if (open(my $ErrFile, ">>", $FullErrFileName))
{
- umask($OldUMask);
print $ErrFile $ErrMessage;
close($ErrFile);
}
else
{
- umask($OldUMask);
Error "Unable to open '$FullErrFileName' for writing: $!\n";
}
+ umask($OldUMask);
}
sub WrapUpAndExit($)
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 2c8e2fb..1bc5c4c 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -180,15 +180,14 @@ sub LogTaskError($)
my $OldUMask = umask(002);
if (open(my $ErrFile, ">>", $FullErrFileName))
{
- umask($OldUMask);
print $ErrFile $ErrMessage;
close($ErrFile);
}
else
{
- umask($OldUMask);
Error "Unable to open '$FullErrFileName' for writing: $!\n";
}
+ umask($OldUMask);
}
sub WrapUpAndExit($)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 875213b..c3260bc 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -68,15 +68,14 @@ sub TakeScreenshot($$)
my $OldUMask = umask(002);
if (open SCREENSHOT, ">$FullScreenshotFileName")
{
- umask($OldUMask);
print SCREENSHOT $ImageBytes;
close SCREENSHOT;
}
else
{
- umask($OldUMask);
Error "Can't save screenshot: $!\n";
}
+ umask($OldUMask);
}
else
{
@@ -207,15 +206,14 @@ sub LogTaskError($)
my $OldUMask = umask(002);
if (open(my $ErrFile, ">>", $FullErrFileName))
{
- umask($OldUMask);
print $ErrFile $ErrMessage;
close($ErrFile);
}
else
{
- umask($OldUMask);
Error "Unable to open '$FullErrFileName' for writing: $!\n";
}
+ umask($OldUMask);
}
sub WrapUpAndExit($;$)
More information about the wine-cvs
mailing list