mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
Staggered File Versioning used to have its own cleanInterval that controlled how often file versions were cleaned. Nowadays, there is a seperate setting called cleanupIntervalS responsible for the cleanup, which applies to all File Versioning (except External). Thus, remove the unneeded code and don't set the param up on new folders anymore. Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
This commit is contained in:
parent
2738735321
commit
d35d7d2360
@ -74,7 +74,6 @@ angular.module('syncthing.core')
|
||||
cleanupIntervalS: 3600,
|
||||
simpleKeep: 5,
|
||||
staggeredMaxAge: 365,
|
||||
staggeredCleanInterval: 3600,
|
||||
externalCommand: "",
|
||||
};
|
||||
|
||||
@ -2071,7 +2070,6 @@ angular.module('syncthing.core')
|
||||
break;
|
||||
case "staggered":
|
||||
$scope.currentFolder._guiVersioning.staggeredMaxAge = Math.floor(+currentVersioning.params.maxAge / 86400);
|
||||
$scope.currentFolder._guiVersioning.staggeredCleanInterval = +currentVersioning.params.cleanInterval;
|
||||
break;
|
||||
case "external":
|
||||
$scope.currentFolder._guiVersioning.externalCommand = currentVersioning.params.command;
|
||||
@ -2256,7 +2254,6 @@ angular.module('syncthing.core')
|
||||
break;
|
||||
case "staggered":
|
||||
folderCfg.versioning.params.maxAge = '' + (folderCfg._guiVersioning.staggeredMaxAge * 86400);
|
||||
folderCfg.versioning.params.cleanInterval = '' + folderCfg._guiVersioning.staggeredCleanInterval;
|
||||
break;
|
||||
case "external":
|
||||
folderCfg.versioning.params.command = '' + folderCfg._guiVersioning.externalCommand;
|
||||
|
@ -29,7 +29,7 @@ import (
|
||||
|
||||
const (
|
||||
OldestHandledVersion = 10
|
||||
CurrentVersion = 35
|
||||
CurrentVersion = 36
|
||||
MaxRescanIntervalS = 365 * 24 * 60 * 60
|
||||
)
|
||||
|
||||
|
@ -27,6 +27,7 @@ import (
|
||||
// put the newest on top for readability.
|
||||
var (
|
||||
migrations = migrationSet{
|
||||
{36, migrateToConfigV36},
|
||||
{35, migrateToConfigV35},
|
||||
{34, migrateToConfigV34},
|
||||
{33, migrateToConfigV33},
|
||||
@ -94,6 +95,12 @@ func (m migration) apply(cfg *Configuration) {
|
||||
cfg.Version = m.targetVersion
|
||||
}
|
||||
|
||||
func migrateToConfigV36(cfg *Configuration) {
|
||||
for i := range cfg.Folders {
|
||||
delete(cfg.Folders[i].Versioning.Params, "cleanInterval")
|
||||
}
|
||||
}
|
||||
|
||||
func migrateToConfigV35(cfg *Configuration) {
|
||||
for i, fcfg := range cfg.Folders {
|
||||
params := fcfg.Versioning.Params
|
||||
|
Loading…
Reference in New Issue
Block a user