From: HÃ¥kan Jerning Date: Mon, 7 May 2012 19:09:42 +0000 (+0200) Subject: Bug 744338: jobqueue.pl won't work if not called from the bugzilla/ root directory X-Git-Tag: bugzilla-4.2.2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74697b930064a2b07bed7f09a699f7abcb6a2dd6;p=thirdparty%2Fbugzilla.git Bug 744338: jobqueue.pl won't work if not called from the bugzilla/ root directory r/a=LpSolit --- diff --git a/jobqueue.pl b/jobqueue.pl index 3d495c422a..775fe8dd64 100755 --- a/jobqueue.pl +++ b/jobqueue.pl @@ -22,8 +22,14 @@ # Max Kanat-Alexander 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;