소스 검색

Don't clobber staggeredMaxAge = 0 (fixes #604)

Jakob Borg 11 년 전
부모
커밋
faac3e7d7c
2개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 0
      auto/gui.files.go
  2. 7 1
      gui/app.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
auto/gui.files.go


+ 7 - 1
gui/app.js

@@ -737,10 +737,16 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
             $scope.currentRepo.FileVersioningSelector = "none";
         }
         $scope.currentRepo.simpleKeep = $scope.currentRepo.simpleKeep || 5;
-        $scope.currentRepo.staggeredMaxAge = $scope.currentRepo.staggeredMaxAge || 365;
         $scope.currentRepo.staggeredCleanInterval = $scope.currentRepo.staggeredCleanInterval || 3600;
         $scope.currentRepo.staggeredVersionsPath = $scope.currentRepo.staggeredVersionsPath || "";
 
+        // staggeredMaxAge can validly be zero, which we should not replace
+        // with the default value of 365. So only set the default if it's
+        // actually undefined.
+        if (typeof $scope.currentRepo.staggeredMaxAge === 'undefined') {
+            $scope.currentRepo.staggeredMaxAge = 365;
+        }
+
         $scope.editingExisting = true;
         $scope.repoEditor.$setPristine();
         $('#editRepo').modal();

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.