syncthing/lib/protocol
Jakob Borg 5b37d0356c lib/model, gui: Correct completion percentages when there are lots of deletes (fixes #3496)
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
2016-09-02 06:45:46 +00:00
..
LICENSE Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
benchmark_test.go lib/connections, lib/model: Refactor connection close handling (fixes #3466) 2016-08-10 09:37:32 +00:00
bep.pb.go lib/protocol, lib/model: Implement high precision time stamps (fixes #3305) 2016-08-06 13:05:59 +00:00
bep.proto lib/protocol, lib/model: Implement high precision time stamps (fixes #3305) 2016-08-06 13:05:59 +00:00
bep_extensions.go lib/model, gui: Correct completion percentages when there are lots of deletes (fixes #3496) 2016-09-02 06:45:46 +00:00
bufferpool.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
common_test.go lib/connections, lib/model: Refactor connection close handling (fixes #3466) 2016-08-10 09:37:32 +00:00
compression.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
compression_test.go Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
conflict_test.go lib/protocol, lib/model: Implement high precision time stamps (fixes #3305) 2016-08-06 13:05:59 +00:00
counting.go Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
debug.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
deviceid.go lib: Use bytes.Equal instead of bytes.Compare where possible 2016-03-31 15:12:46 +00:00
deviceid_test.go A couple of protocol tests 2016-01-20 11:37:48 -08:00
doc.go Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
errors.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
hello.go lib/protocol: Hello message length is an int16 2016-07-17 21:41:20 +00:00
hello_test.go lib/protocol: Hello message length is an int16 2016-07-17 21:41:20 +00:00
hello_v0.13.go lib/protocol: Understand older/newer Hello messages (fixes #3287) 2016-06-09 10:50:14 +00:00
hello_v0.13_xdr.go lib/protocol: Understand older/newer Hello messages (fixes #3287) 2016-06-09 10:50:14 +00:00
nativemodel_darwin.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
nativemodel_unix.go lib/model, lib/protocol: Implement temporary indexes (fixes #950) 2016-04-15 10:59:41 +00:00
nativemodel_windows.go cmd/syncthing, lib/...: Correctly handle ignores & invalid file names (fixes #3012, fixes #3457, fixes #3458) 2016-08-05 07:13:52 +00:00
protocol.go lib/connections, lib/model: Refactor connection close handling (fixes #3466) 2016-08-10 09:37:32 +00:00
protocol_test.go lib/protocol, lib/model: Implement high precision time stamps (fixes #3305) 2016-08-06 13:05:59 +00:00
vector.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
vector_test.go build, cmd, lib: Minimum supported compiler version is Go 1.5 2016-08-15 08:37:32 +02:00
wireformat.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00