summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHåkan Jerning <hakjer@netinsight.net>2012-05-07 21:09:42 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-05-07 21:09:42 +0200
commit74697b930064a2b07bed7f09a699f7abcb6a2dd6 (patch)
tree3f4761f80dc2d798628d84521c08b8412cf0bf5e
parent3b9a39da6dabb27ecf3ed4da7b6e2ea4eab750cd (diff)
downloadbugzilla-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-xjobqueue.pl8
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;