Module: tools Branch: master Commit: 8db6b37d2e0f03a607eddd20bf69948b5303d9db URL: https://source.winehq.org/git/tools.git/?a=commit;h=8db6b37d2e0f03a607eddd20...
Author: Francois Gouget fgouget@codeweavers.com Date: Tue Apr 5 18:17:30 2022 +0200
testbot: GetTaskURL() should load URI::Escape only when needed.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/lib/WineTestBot/Utils.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/WineTestBot/Utils.pm b/testbot/lib/WineTestBot/Utils.pm index bc501ff..2ebad45 100644 --- a/testbot/lib/WineTestBot/Utils.pm +++ b/testbot/lib/WineTestBot/Utils.pm @@ -35,7 +35,6 @@ our @EXPORT = qw(SecureConnection MakeSecureURL MakeOfficialURL GetTaskURL BatchQuote ShQuote ShArgv2Cmd);
use Fcntl qw(O_CREAT O_EXCL O_WRONLY); -use URI::Escape;
use WineTestBot::Config;
@@ -121,7 +120,11 @@ sub GetTaskURL($$$;$$) my $StepTask = 100 * $StepNo + $TaskNo; my $URL = "/JobDetails.pl?Key=$JobId"; $URL .= "&s$StepTask=1" if ($ShowScreenshot); - $URL .= "&f$StepTask=". uri_escape($LogName) if ($LogName); + if (defined $LogName) + { + require URI::Escape; + $URL .= "&f$StepTask=". URI::Escape::uri_escape($LogName); + } return "$URL#k$StepTask"; }