diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 8ae34393a..23d73a4f9 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -2019,7 +2019,11 @@ angular.module('syncthing.core') $scope.folders[folderCfg.id] = folderCfg; $scope.config.folders = folderList($scope.folders); - if (ignoresLoaded && $scope.editingExisting && ignores !== folderCfg.ignores) { + function arrayEquals(a, b) { + return a.length === b.length && a.every(function(v, i) { return v === b[i] }); + } + + if (ignoresLoaded && $scope.editingExisting && !arrayEquals(ignores, folderCfg.ignores)) { saveIgnores(ignores); }; diff --git a/gui/default/untrusted/syncthing/core/syncthingController.js b/gui/default/untrusted/syncthing/core/syncthingController.js index 479198654..418ffe306 100755 --- a/gui/default/untrusted/syncthing/core/syncthingController.js +++ b/gui/default/untrusted/syncthing/core/syncthingController.js @@ -2037,7 +2037,11 @@ angular.module('syncthing.core') $scope.folders[folderCfg.id] = folderCfg; $scope.config.folders = folderList($scope.folders); - if (ignoresLoaded && $scope.editingExisting && ignores !== folderCfg.ignores) { + function arrayEquals(a, b) { + return a.length === b.length && a.every(function(v, i) { return v === b[i] }); + } + + if (ignoresLoaded && $scope.editingExisting && !arrayEquals(ignores, folderCfg.ignores)) { saveIgnores(ignores); };