зеркало из https://github.com/mozilla/pjs.git
Родитель
5996e3d1c1
Коммит
c813e13038
|
@ -21,7 +21,6 @@
|
|||
# Contributor(s):
|
||||
|
||||
use lib "@TINDERBOX_DIR@";
|
||||
require 'tbglobals.pl'; # for $gzip
|
||||
use strict;
|
||||
use Getopt::Std;
|
||||
|
||||
|
@ -29,6 +28,10 @@ my $verbose = 0;
|
|||
my $tinderboxdir = "@TINDERBOX_DIR@";
|
||||
chdir $tinderboxdir or die "Couldn't chdir to $tinderboxdir";
|
||||
|
||||
# tbglobals.pl must be included after chdir
|
||||
# so that $::tree_dir is set correctly
|
||||
require 'tbglobals.pl'; # for $gzip
|
||||
|
||||
our ($opt_h, $opt_v);
|
||||
getopts('hv');
|
||||
usage() if (defined($opt_h));
|
||||
|
|
|
@ -786,6 +786,12 @@ sub tb_trim_logs($$$$) {
|
|||
return if (!defined($days) || !defined($tree) || !defined($verbose) ||
|
||||
!defined($do_html));
|
||||
|
||||
# warn if the directory cannot be found and return
|
||||
if (! -d "$::tree_dir/$tree") {
|
||||
warn("Cannot find directory: " . shell_escape("$::tree_dir/$tree"));
|
||||
return;
|
||||
}
|
||||
|
||||
my $min_date = time - (60*60*24 * $days);
|
||||
|
||||
#
|
||||
|
|
Загрузка…
Ссылка в новой задаче