From c670b2e7eb3f2683980d19d2dacffe721706a495 Mon Sep 17 00:00:00 2001 From: "kestes%staff.mail.com" Date: Sat, 6 Jan 2001 01:31:30 +0000 Subject: [PATCH] clean up the SECONDS_PER_* variables add some periods to the end of error messages. --- webtools/tinderbox2/src/lib/Utils.pm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/webtools/tinderbox2/src/lib/Utils.pm b/webtools/tinderbox2/src/lib/Utils.pm index 68a9a14d865..b7d67ee6f8a 100755 --- a/webtools/tinderbox2/src/lib/Utils.pm +++ b/webtools/tinderbox2/src/lib/Utils.pm @@ -3,8 +3,8 @@ # Utils.pm - General purpose utility functions. Every project needs a # kludge bucket for common access. -# $Revision: 1.11 $ -# $Date: 2001-01-05 17:30:35 $ +# $Revision: 1.12 $ +# $Date: 2001-01-06 01:31:30 $ # $Author: kestes%staff.mail.com $ # $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/Utils.pm,v $ # $Name: $ @@ -58,7 +58,7 @@ sub security_check_data_dir { my ($dir) = (@_); ( -l $dir ) && - die("Security Error. dir: $dir is a symbolic link\n"); + die("Security Error. dir: $dir is a symbolic link.\n"); mkdir_R($dir); @@ -73,11 +73,11 @@ sub security_check_data_dir { my $tinderbox_uid = $<; ( $uid == $tinderbox_uid ) || - die("Security Error. dir: $dir is not owned by ". - "the tinderbox id: $tinderbox_uid\n"); + die("Security Error. dir: $dir, owner: $uid is not owned by ". + "the tinderbox id: $tinderbox_uid.\n"); ( $mode & 02) && - die("Security Error. dir: $dir is writable by other\n"); + die("Security Error. dir: $dir is writable by other.\n"); return 1; } @@ -103,8 +103,10 @@ sub set_static_vars { # rather then some mysterious constants hard coded into the code. $SECONDS_PER_MINUTE = (60); - $SECONDS_PER_HOUR = (60*60); - $SECONDS_PER_DAY = (60*60*24); + $SECONDS_PER_HOUR = (60*$SECONDS_PER_MINUTE); + $SECONDS_PER_DAY = (24*$SECONDS_PER_HOUR); + $SECONDS_PER_MONTH = (30*$SECONDS_PER_DAY); + $SECONDS_PER_YEAR = (365*$SECONDS_PER_DAY); # where errors are loged