mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 10:28:49 -07:00
5b37d0356c
We used to consider deleted files & directories 128 bytes large. After the delta indexes change a bug slipped in where deleted files would be weighted according to their old non-deleted size. Both ways are incorrect (but the latest change made it worse), as if there are more files deleted than remaining data in the repo the needSize can be greater than the globalSize, resulting in a negative completion percentage. This change makes it so that deleted items are zero bytes large, which makes more sense. Instead we expose the number of files that we need to delete as a separate field in the Completion() result, and hack the percentage down to 95% complete if it was 100% complete but we need to delete files. This latter part is sort of ugly, but necessary to give the user some sort of feedback. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3556 |
||
---|---|---|
.. | ||
testdata | ||
.gitignore | ||
benchmark_test.go | ||
blockmap_test.go | ||
blockmap.go | ||
concurrency_test.go | ||
debug.go | ||
leveldb_dbinstance.go | ||
leveldb_test.go | ||
leveldb_transactions.go | ||
leveldb.go | ||
namespaced_test.go | ||
namespaced.go | ||
set_test.go | ||
set.go | ||
structs.go | ||
structs.pb.go | ||
structs.proto |