diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-05-17 19:56:31 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-05-17 19:56:31 +0200 |
commit | 2f99841240904b6a487c9216b410e3e34e8506ac (patch) | |
tree | 56da7d5d006335c635a888d9bdfdf8d6d2c97678 /bin | |
parent | 60fba3105a1bf2f537742cfe591f5af1e5c5faa2 (diff) |
Improve $hashl->add_file
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/hashl | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -162,17 +162,12 @@ sub db_update { my ($file, $path) = @_; my ($size, $mtime) = (stat($path))[7,9]; - if ($hashl->file($file) and - $hashl->file($file)->{mtime} == $mtime and - $hashl->file($file)->{size} == $size ) { - return; - } - - $hashl->add_file($file, { - hash => $hashl->hash_file($path), + $hashl->add_file( + file => $file, mtime => $mtime, + path => $path, size => $size, - }); + ); } sub db_ignore { |