mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-13 00:36:28 +00:00
6e768a8387
The cleaning logic in util.go was used by Simple and Trashcan but only really suited Trashcan since it works based on mtimes which Simple does not use. The cleaning logic in util.go was moved to trashcan.go. Staggered and Simple seemed to be able to benefit from the same base so util.go now has the base for those two with an added parameter which takes a function so it can still handle versioner-specific logic to decide which files to clean up. Simple now also correctly cleans files based on their time-stamp in the title together with a specific maximum amount to keep. The Archive function in Simple.go was changed to get rid of duplicated code. Additionally the trashcan testcase which was used by Trashcan as well as Simple was moved from versioner_test.go to trashcan_test.go to keep it clean, there was no need to keep it in a separate test file |
||
---|---|---|
.. | ||
_external_test | ||
.gitignore | ||
debug.go | ||
empty_dir_tracker_test.go | ||
empty_dir_tracker.go | ||
external_test.go | ||
external.go | ||
simple_test.go | ||
simple.go | ||
staggered_test.go | ||
staggered.go | ||
trashcan_test.go | ||
trashcan.go | ||
util.go | ||
versioner.go |