diff --git a/deep_fixitycheck.pl b/deep_fixitycheck.pl index 611721c91fad9d6e5b748a70a7983edc6cc3bffc..bd554f5e00104a0e82a534fcaf1a994ae652e061 100644 --- a/deep_fixitycheck.pl +++ b/deep_fixitycheck.pl @@ -322,10 +322,12 @@ if (defined $search_dir && -d "$search_dir") { my $result; $result->{errors} = 0; $result = check_if_file_exist($fileobj, $result); - $result = check_file_size($fileobj, $result); - foreach my $fixity_algorithm ( @algorithms) { - if ($fileobj->{fixity}->{$fixity_algorithm}) { - $result = check_file_fixity($fileobj, $result, $fixity_algorithm); + if ($result->{exist}) { # only if file exists, do additional checks + $result = check_file_size($fileobj, $result); + foreach my $fixity_algorithm (@algorithms) { + if ($fileobj->{fixity}->{$fixity_algorithm}) { + $result = check_file_fixity($fileobj, $result, $fixity_algorithm); + } } } if ($result->{errors} > 0) {