mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
fix(gui,cli): count what a folder's first scan has checked (#46)
The first pass over a synced folder has no baseline to estimate from, so its scan showed only "checking for changes…" in the app and "scanning…" in `pdfs sync list`. For a large folder that scan reads every item on Proton Drive before anything downloads, which takes many minutes and looked stuck. Both now show how many items the scan has checked so far.
This commit is contained in:
1 parent
a5acae41b3
commit
0e7ffe1261
12 files changed
+833
-687
No files matched your search
@@ -1143,7 +1143,14 @@ fn cmd_sync(action: SyncCmd) -> Result<()> {
|
||||
// A pass in flight says what it is doing, indented under it.
|
||||
if let Some(p) = &f.progress {
|
||||
match p.phase {
|
||||
SyncPhase::Scanning if p.total == 0 => println!(" scanning…"),
|
||||
SyncPhase::Scanning if p.total == 0 && p.done == 0 => {
|
||||
println!(" scanning…")
|
||||
}
|
||||
// A first pass has no estimate yet; the count alone
|
||||
// shows a long first scan is moving.
|
||||
SyncPhase::Scanning if p.total == 0 => {
|
||||
println!(" scanning: {} checked", p.done)
|
||||
}
|
||||
SyncPhase::Scanning => {
|
||||
println!(
|
||||
" scanning: {} of {}",
|
||||
|
||||
Reference in new issue
Block a user