try to fix error-on-first-report

This commit is contained in:
mcafee%netscape.com 2001-11-30 07:57:19 +00:00
Родитель 314061fded
Коммит 30436cd379
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -39,9 +39,14 @@ die "No 'value' parameter supplied"
die "No 'data' parameter supplied"
unless $data;
# If file doesn't exist, try creating empty file.
unless (-f "db/$tbox") {
open(FILE, "> db/$tbox") || die "Can't create new file db/$tbox: $!";
}
# record data
open(FILE, ">> db/$tbox") ||
die "Can't open $tbox: $!";
die "Can't open db/$tbox: $!";
print FILE "$time\t$value\t$data\t$ip\t$tbox\t$ua\n";
close(FILE);