mirror: stop per-file lines resetting the progress gauge to 0%
parse_rclone_stats still accepted rclone's `Transferring:` entries (`* a.bin: 25% / 60 MiB, 0 B/s, -`) because they contain " / " and "%". rclone writes them right after the byte-weighted line on every tick, and since the last per-file entry is glued to the *next* tick's byte line, the parsed order per second is: good byte line -> per-file 0% -> (one second later) glued byte line. The gauge therefore displayed 0% almost continuously and only ever looked right at the end. Require a real stats body to start with the transferred byte amount. Per-file lines now only feed the "current file" display (they already did, as a fallback) and can no longer touch pct/done/total. Verified with the real engine + rclone (bwlimit): mirror state now goes 0 -> 25 -> 50 -> 75 -> 100 with proper byte counts. The replay test now asserts the exact parse sequence [10%, 40%] so a regression fails when a per-file or file-count line sneaks in as 0%. Bump to 0.3.1.
This commit is contained in:
Generated
+1
-1
@@ -253,7 +253,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dap-tui"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
||||
Reference in New Issue
Block a user