mirror of
https://codeberg.org/h3xx/simplify_static_dir
synced 2024-08-14 23:57:24 +00:00
Exit early if no linkable files are found
Fixes a warning.
This commit is contained in:
parent
047df6c97b
commit
89b64b1ca1
1 changed files with 6 additions and 1 deletions
|
@ -197,12 +197,17 @@ MAIN: {
|
|||
scalar @files
|
||||
if $opts{v};
|
||||
|
||||
unless (@files) {
|
||||
printf STDERR "Nothing to do.\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
print STDERR "Generating hashes..." if $opts{v};
|
||||
my $filehash = Directory::Simplify::FileHash->new;
|
||||
my $report_every = 1; # seconds
|
||||
my $processed_bytes = 0;
|
||||
my $last_report = time;
|
||||
my $total_size_hr = sprintf "%0.4G %s", Directory::Simplify::Utils::hr_size(&sum(map { $_->{size} } @files));
|
||||
my $total_size_hr = sprintf "%0.4G %s", Directory::Simplify::Utils::hr_size(&sum(map { $_->{size} } @files) or 0);
|
||||
printf STDERR "\e\x{37}";
|
||||
my $cb = sub {
|
||||
my ($file, $now) = (shift, time);
|
||||
|
|
Loading…
Reference in a new issue