gui: Do not replace zero versioning cleanup interval (#7234)

This commit is contained in:
Simon Frei 2020-12-27 10:08:15 +01:00 committed by GitHub
parent f13e6ca631
commit 5440d1dc3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -1812,7 +1812,10 @@ angular.module('syncthing.core')
$scope.currentFolder.simpleKeep = $scope.currentFolder.simpleKeep || 5;
$scope.currentFolder.staggeredCleanInterval = $scope.currentFolder.staggeredCleanInterval || 3600;
$scope.currentFolder.staggeredVersionsPath = $scope.currentFolder.staggeredVersionsPath || "";
$scope.currentFolder.versioningCleanupIntervalS = $scope.currentFolder.versioningCleanupIntervalS || 3600;
// Zero is a valid, non-default value (disabled)
if ($scope.currentFolder.versioningCleanupIntervalS !== 0) {
$scope.currentFolder.versioningCleanupIntervalS = $scope.currentFolder.versioningCleanupIntervalS || 3600;
}
// staggeredMaxAge can validly be zero, which we should not replace
// with the default value of 365. So only set the default if it's

View File

@ -1829,7 +1829,10 @@ angular.module('syncthing.core')
$scope.currentFolder.simpleKeep = $scope.currentFolder.simpleKeep || 5;
$scope.currentFolder.staggeredCleanInterval = $scope.currentFolder.staggeredCleanInterval || 3600;
$scope.currentFolder.staggeredVersionsPath = $scope.currentFolder.staggeredVersionsPath || "";
$scope.currentFolder.versioningCleanupIntervalS = $scope.currentFolder.versioningCleanupIntervalS || 3600;
// Zero is a valid, non-default value (disabled)
if ($scope.currentFolder.versioningCleanupIntervalS !== 0) {
$scope.currentFolder.versioningCleanupIntervalS = $scope.currentFolder.versioningCleanupIntervalS || 3600;
}
// staggeredMaxAge can validly be zero, which we should not replace
// with the default value of 365. So only set the default if it's