summaryrefslogtreecommitdiffstats
path: root/collectstats.pl
diff options
context:
space:
mode:
Diffstat (limited to 'collectstats.pl')
-rwxr-xr-xcollectstats.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/collectstats.pl b/collectstats.pl
index f5ba2ddab..f8ee89215 100755
--- a/collectstats.pl
+++ b/collectstats.pl
@@ -49,9 +49,12 @@ use Bugzilla::Field;
# in the regenerate mode).
$| = 1;
+my $datadir = bz_locations()->{'datadir'};
+my $graphsdir = bz_locations()->{'graphsdir'};
+
# Tidy up after graphing module
my $cwd = Cwd::getcwd();
-if (chdir("graphs")) {
+if (chdir($graphsdir)) {
unlink <./*.gif>;
unlink <./*.png>;
# chdir("..") doesn't work if graphs is a symlink, see bug 429378
@@ -68,8 +71,6 @@ if ($#ARGV >= 0 && $ARGV[0] eq "--regenerate") {
$regenerate = 1;
}
-my $datadir = bz_locations()->{'datadir'};
-
# As we can now customize statuses and resolutions, looking at the current list
# of legal values only is not enough as some now removed statuses and resolutions
# may have existed in the past, or have been renamed. We want them all.