syncthing/lib/model
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
..
testdata
.gitignore
debug.go Implement facility based logger, debugging via REST API 2015-10-03 18:09:53 +02:00
deviceactivity_test.go lib/model, lib/protocol: Implement temporary indexes (fixes #950) 2016-04-15 10:59:41 +00:00
deviceactivity.go lib/model, lib/protocol: Implement temporary indexes (fixes #950) 2016-04-15 10:59:41 +00:00
devicedownloadstate_test.go lib/model: Test should pass go vet inspections 2016-04-15 11:41:18 +00:00
devicedownloadstate.go lib/model: Don't deadlock when returning temp index block counts 2016-05-26 09:16:08 +00:00
doc.go
folder.go lib/model: Refactor encapsulation of the folder scanning 2016-06-29 06:37:34 +00:00
folderscanner.go lib/model: Refactor encapsulation of the folder scanning 2016-06-29 06:37:34 +00:00
folderstate.go lib/model: Refactor encapsulation of the folder scanning 2016-06-29 06:37:34 +00:00
model_test.go lib/model, gui: Correct completion percentages when there are lots of deletes (fixes #3496) 2016-09-02 06:45:46 +00:00
model.go lib/model, gui: Correct completion percentages when there are lots of deletes (fixes #3496) 2016-09-02 06:45:46 +00:00
progressemitter_test.go lib/model: Add minumum interval for progress emitter (fixes #3517) 2016-08-16 18:22:01 +00:00
progressemitter.go lib/model: Add minumum interval for progress emitter (fixes #3517) 2016-08-16 18:22:01 +00:00
queue_test.go build, cmd, lib: Minimum supported compiler version is Go 1.5 2016-08-15 08:37:32 +02:00
queue.go lib/protocol, lib/model: Implement high precision time stamps (fixes #3305) 2016-08-06 13:05:59 +00:00
rofolder.go lib/db, lib/fs, lib/model: Introduce fs.MtimeFS, remove VirtualMtimeRepo 2016-08-05 17:45:45 +00:00
rwfolder_test.go lib/protocol, lib/model: Implement high precision time stamps (fixes #3305) 2016-08-06 13:05:59 +00:00
rwfolder.go lib/model: Correct virtual mtime handling (fixes #3516) 2016-08-16 18:22:19 +00:00
sentdownloadstate.go lib/model: Track puller creation times (fixes #3145) 2016-05-22 10:16:09 +00:00
sharedpullerstate_test.go cmd, lib: Fix ineffectual assignments (ineffasign) and comment spelling 2016-07-15 14:23:20 +00:00
sharedpullerstate.go lib/model: Stricter temporary file permissions 2016-07-25 10:18:05 +00:00
sorter_test.go lib/protocol, lib/model: Implement high precision time stamps (fixes #3305) 2016-08-06 13:05:59 +00:00
sorter.go lib: Remove osutil.Remove & osutil.RemoveAll (fixes #3513) 2016-08-16 10:01:58 +00:00
tempname_test.go
tempname.go lib/model: Decrease max temp filename length (fixes #3338, fixes #3355) 2016-06-27 11:47:40 +00:00
util.go