Only print rsync stats if some data was transferred
This commit is contained in:
parent
005ab58b15
commit
dc2bac0068
@ -640,5 +640,5 @@ def receive_main(cli_opts: TransferCLIOptions, args: List[str]) -> None:
|
|||||||
tsf += f.expected_size
|
tsf += f.expected_size
|
||||||
dsz += f.received_bytes
|
dsz += f.received_bytes
|
||||||
ssz += f.sent_bytes
|
ssz += f.sent_bytes
|
||||||
if tsf:
|
if tsf and dsz + ssz:
|
||||||
print_rsync_stats(tsf, dsz, ssz)
|
print_rsync_stats(tsf, dsz, ssz)
|
||||||
|
|||||||
@ -699,6 +699,8 @@ class Send(Handler):
|
|||||||
self.progress_drawn = True
|
self.progress_drawn = True
|
||||||
|
|
||||||
def refresh_progress(self) -> None:
|
def refresh_progress(self) -> None:
|
||||||
|
if not self.transmit_started:
|
||||||
|
return
|
||||||
self.erase_progress()
|
self.erase_progress()
|
||||||
self.draw_progress()
|
self.draw_progress()
|
||||||
|
|
||||||
@ -720,9 +722,9 @@ def send_main(cli_opts: TransferCLIOptions, args: List[str]) -> None:
|
|||||||
loop = Loop()
|
loop = Loop()
|
||||||
handler = Send(cli_opts, files)
|
handler = Send(cli_opts, files)
|
||||||
loop.loop(handler)
|
loop.loop(handler)
|
||||||
if handler.manager.has_rsync:
|
p = handler.manager.progress
|
||||||
|
if handler.manager.has_rsync and p.total_transferred + p.signature_bytes:
|
||||||
tsf = 0
|
tsf = 0
|
||||||
p = handler.manager.progress
|
|
||||||
for f in files:
|
for f in files:
|
||||||
if f.ttype is TransmissionType.rsync:
|
if f.ttype is TransmissionType.rsync:
|
||||||
tsf += f.file_size
|
tsf += f.file_size
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user