From b87849403ae345f65bdd9630504e0398e2d413bf Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Mon, 7 May 2012 19:16:06 +0000 Subject: [PATCH] Bug 744338: jobqueue.pl won't work if not called from the bugzilla/ root directory r/a=LpSolit git-svn-id: svn://10.0.0.236/trunk@263792 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/jobqueue.pl | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index fb7340b31af..35e5111f361 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -8219 \ No newline at end of file +8220 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/jobqueue.pl b/mozilla/webtools/bugzilla/jobqueue.pl index f56e2cdb6fb..1b956917e08 100755 --- a/mozilla/webtools/bugzilla/jobqueue.pl +++ b/mozilla/webtools/bugzilla/jobqueue.pl @@ -7,8 +7,14 @@ # defined by the Mozilla Public License, v. 2.0. use strict; + +use Cwd qw(abs_path); use File::Basename; -BEGIN { chdir dirname($0); } +BEGIN { + # Untaint the abs_path. + my ($a) = abs_path($0) =~ /^(.*)$/; + chdir dirname($a); +} use lib qw(. lib); use Bugzilla;