summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHåkan Jerning <hakjer@netinsight.net>2012-05-07 21:07:39 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-05-07 21:07:39 +0200
commit2b222a696035597e471c03b3cfa858f0d64f65c9 (patch)
tree205e169c07fff7825f4cb8a2c824f94d8c8d6f32
parent92a81752931c5fd7cdbf4b63305389844193d029 (diff)
downloadbugzilla-2b222a696035597e471c03b3cfa858f0d64f65c9.tar.gz
bugzilla-2b222a696035597e471c03b3cfa858f0d64f65c9.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 f56e2cdb6..1b956917e 100755
--- a/jobqueue.pl
+++ b/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;