--- loncom/debugging_tools/rebuild_db_from_hist.pl 2004/12/08 22:34:30 1.2 +++ loncom/debugging_tools/rebuild_db_from_hist.pl 2004/12/09 20:01:48 1.3 @@ -4,7 +4,7 @@ # # rebuild_db_from_hist.pl Rebuild a *.db file from a *.hist file # -# $Id: rebuild_db_from_hist.pl,v 1.2 2004/12/08 22:34:30 matthew Exp $ +# $Id: rebuild_db_from_hist.pl,v 1.3 2004/12/09 20:01:48 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -69,7 +69,7 @@ while (my $fname = shift) { print STDERR "Aborting: The target file $db_filename exists.".$/; next; } - my ($error,$constructed_hash) = &process_file($fname,$db_filename); + my ($error,$constructed_hash) = &process_file($fname,$db_filename,$debug); if (! defined($error) || ! $test) { $error = &write_hash($db_filename,$constructed_hash); } @@ -104,6 +104,9 @@ sub process_file { # P:put # D:delete my ($action,$time,$concatenated_data) = split(':',$command,3); + if ($fname eq 'roles.hist' && $concatenated_data =~ /^.*:.*:/) { + (undef,undef,$concatenated_data) = split(':',$concatenated_data,3); + } my @data = split('&',$concatenated_data); foreach my $k_v_pair (@data) { my ($key,$value) = split('=',$k_v_pair,2);