diff options
author | Håkan Jerning <hakjer@netinsight.net> | 2012-05-07 21:09:42 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-05-07 21:09:42 +0200 |
commit | 74697b930064a2b07bed7f09a699f7abcb6a2dd6 (patch) | |
tree | 3f4761f80dc2d798628d84521c08b8412cf0bf5e | |
parent | 3b9a39da6dabb27ecf3ed4da7b6e2ea4eab750cd (diff) | |
download | bugzilla-74697b930064a2b07bed7f09a699f7abcb6a2dd6.tar.gz bugzilla-74697b930064a2b07bed7f09a699f7abcb6a2dd6.tar.xz |
Bug 744338: jobqueue.pl won't work if not called from the bugzilla/ root directory
r/a=LpSolit
-rwxr-xr-x | jobqueue.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/jobqueue.pl b/jobqueue.pl index 3d495c422..775fe8dd6 100755 --- a/jobqueue.pl +++ b/jobqueue.pl @@ -22,8 +22,14 @@ # Max Kanat-Alexander <mkanat@bugzilla.org> 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; |