fix: progress increasing, instead of decreasing
This commit is contained in:
parent
9c6d549f6e
commit
40bb5e0a54
1 changed files with 2 additions and 2 deletions
|
@ -85,7 +85,6 @@ impl FileInfo
|
||||||
if iteration != 0
|
if iteration != 0
|
||||||
{
|
{
|
||||||
self.read_exact(&mut buffer, debug_mode);
|
self.read_exact(&mut buffer, debug_mode);
|
||||||
println!("%{}", (iteration as f64/total_iteration as f64)*100 as f64);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -96,6 +95,7 @@ impl FileInfo
|
||||||
println!("Read Data = {:#?}", buffer);
|
println!("Read Data = {:#?}", buffer);
|
||||||
}
|
}
|
||||||
self.send_exact(&mut buffer, stream, debug_mode);
|
self.send_exact(&mut buffer, stream, debug_mode);
|
||||||
|
println!("%{}", 100 as f64 -((iteration as f64/total_iteration as f64)*100 as f64));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn handshake_validation(&mut self, stream:&mut TcpStream, size:u64, debug_mode:&bool)
|
fn handshake_validation(&mut self, stream:&mut TcpStream, size:u64, debug_mode:&bool)
|
||||||
|
@ -302,12 +302,12 @@ impl FileInfo
|
||||||
if iteration != 0
|
if iteration != 0
|
||||||
{
|
{
|
||||||
self.save_exact(&buffer, debug_mode);
|
self.save_exact(&buffer, debug_mode);
|
||||||
println!("%{}", (iteration as f64/total_iteration as f64)*100 as f64);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
self.save_exact(&buffer[..(size%BUFFER_SIZE) as usize], debug_mode);
|
self.save_exact(&buffer[..(size%BUFFER_SIZE) as usize], debug_mode);
|
||||||
}
|
}
|
||||||
|
println!("%{}", 100 as f64 -((iteration as f64/total_iteration as f64)*100 as f64));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue