summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-05-17 19:56:31 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-17 19:56:31 +0200
commit2f99841240904b6a487c9216b410e3e34e8506ac (patch)
tree56da7d5d006335c635a888d9bdfdf8d6d2c97678 /bin
parent60fba3105a1bf2f537742cfe591f5af1e5c5faa2 (diff)
Improve $hashl->add_file
Diffstat (limited to 'bin')
-rwxr-xr-xbin/hashl13
1 files changed, 4 insertions, 9 deletions
diff --git a/bin/hashl b/bin/hashl
index 3f03789..4877e87 100755
--- a/bin/hashl
+++ b/bin/hashl
@@ -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 {