Commit 070a3f46 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

In check_consistency(), if finding any inconsistencies, display what

they are.
parent b42e9c30
......@@ -201,9 +201,14 @@ sub check_consistency {
# check if any ids in the database collide with the file
my $consistent = 1;
for my $dbid ( keys %db_codes ) {
if ( !exists $file_codes{$dbid}
|| $file_codes{$dbid} ne $db_codes{$dbid} )
{
if ( !exists $file_codes{$dbid} ) {
printf( "Not consistent: code '%d' ('%s') not in file.\n",
$dbid, $db_codes{$dbid} );
$consistent = 0;
} elsif ( $file_codes{$dbid} ne $db_codes{$dbid} ) {
printf( "Not consistent: code '%d' is '%s' in file "
. "but '%s' in database.\n",
$dbid, $file_codes{$dbid}, $db_codes{$dbid} );
$consistent = 0;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment