Corrected seek issue

This commit is contained in:
bluesaxman 2019-11-01 13:08:45 -06:00
parent 39cf4ad940
commit 69b9947f58

View File

@ -147,6 +147,7 @@ sub wipethemdrives {
open(my $longdiskw, ">:raw", $disks->{$diskid}{path}) or return warning("could not open $disks->{$diskid}{path}");
seek($longdiskw,0,2);
my $totalBytes = tell($longdiskw);
seek($longdiskw,0,0);
until (eof $longdiskw) {
print $longdiskw "\0";
printf(" %5.5s%%\r\r\r\r\r\r\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) );