Commit 6c3f2225 authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'nkfixpercentages' into 'master'

Floor the percentage so we do not hit 100% before finishing

See merge request !21
parents 2d2a10b5 e5bab719
Pipeline #472 passed with stages
in 1 minute and 2 seconds
......@@ -32,6 +32,7 @@ our (@ISA,@EXPORT);
execute
);
use POSIX qw( floor );
use Text::ParseWords;
use wiaflos::constants;
......@@ -232,7 +233,7 @@ sub loadFile
$line_current++;
# Grab percent done
my $percent_done = sprintf('%5.1f',($line_current / $line_total) * 100);
my $percent_done = sprintf('%5.1f',floor(($line_current / $line_total) * 100));
# If its changed, output and save
if ($percent_done ne $percent_last) {
print($OUT " Progress: $percent_done\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment