diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-05-18 02:43:27 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-05-18 02:43:27 +0200 |
commit | c2d52326cf091a82635f1332c6133558d92f9463 (patch) | |
tree | e59a68c8f40125c3e5318435c0ae45bc7f998558 /bin/hashl | |
parent | 712c64c4661f8073e464c014c759ceb7f94bc659 (diff) |
Fix hashl info <file>
Diffstat (limited to 'bin/hashl')
-rwxr-xr-x | bin/hashl | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -119,13 +119,18 @@ sub db_info { sub file_info { my ($file) = @_; + my $entry = $hashl->file($file); + + if (not $entry) { + die("No such file in database\n"); + } printf( "File: %s\nSize: %d bytes (%s)\nHash: %s\n", $file, - $hashl->file($file)->{size}, - $hashl->si_size($hashl->file($file)->{size}), - $hashl->files($file)->{hash}, + $entry->{size}, + $hashl->si_size($entry->{size}), + $entry->{hash}, ); } |