diff --git a/gui/default/syncthing/core/pathIsSubDirDirective.js b/gui/default/syncthing/core/pathIsSubDirDirective.js index dec01faf7..c20040789 100644 --- a/gui/default/syncthing/core/pathIsSubDirDirective.js +++ b/gui/default/syncthing/core/pathIsSubDirDirective.js @@ -20,22 +20,22 @@ angular.module('syncthing.core') }).every(function(e) { return e }); } - scope.pathIsSubFolder = false; - scope.pathIsParentFolder = false; - scope.otherFolder = ""; - scope.otherFolderLabel = ""; + scope.folderPathErrors.isSub = false; + scope.folderPathErrors.isParent = false; + scope.folderPathErrors.otherID = ""; + scope.folderPathErrors.otherLabel = ""; for (var folderID in scope.folders) { if (isSubDir(scope.folders[folderID].path, viewValue)) { - scope.otherFolder = folderID; - scope.otherFolderLabel = scope.folders[folderID].label; - scope.pathIsSubFolder = true; + scope.folderPathErrors.otherID = folderID; + scope.folderPathErrors.otherLabel = scope.folders[folderID].label; + scope.folderPathErrors.isSub = true; break; } if (viewValue !== "" && isSubDir(viewValue, scope.folders[folderID].path)) { - scope.otherFolder = folderID; - scope.otherFolderLabel = scope.folders[folderID].label; - scope.pathIsParentFolder = true; + scope.folderPathErrors.otherID = folderID; + scope.folderPathErrors.otherLabel = scope.folders[folderID].label; + scope.folderPathErrors.isParent = true; break; } } diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 366758315..a4708a491 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -53,27 +53,28 @@ angular.module('syncthing.core') $scope.themes = []; $scope.globalChangeEvents = {}; $scope.metricRates = false; + $scope.folderPathErrors = {}; try { $scope.metricRates = (window.localStorage["metricRates"] == "true"); } catch (exception) { } $scope.folderDefaults = { - selectedDevices: {}, - type: "readwrite", - rescanIntervalS: 60, - minDiskFree: {value: 1, unit: "%"}, - maxConflicts: 10, - fsync: true, - order: "random", - fileVersioningSelector: "none", - trashcanClean: 0, - simpleKeep: 5, - staggeredMaxAge: 365, - staggeredCleanInterval: 3600, - staggeredVersionsPath: "", - externalCommand: "", - autoNormalize: true + selectedDevices: {}, + type: "readwrite", + rescanIntervalS: 60, + minDiskFree: {value: 1, unit: "%"}, + maxConflicts: 10, + fsync: true, + order: "random", + fileVersioningSelector: "none", + trashcanClean: 0, + simpleKeep: 5, + staggeredMaxAge: 365, + staggeredCleanInterval: 3600, + staggeredVersionsPath: "", + externalCommand: "", + autoNormalize: true }; $scope.localStateTotal = { @@ -1409,6 +1410,7 @@ angular.module('syncthing.core') $scope.currentFolder.externalCommand = $scope.currentFolder.externalCommand || ""; $scope.editingExisting = true; + $scope.folderPathErrors = {}; $scope.folderEditor.$setPristine(); $('#editFolder').modal(); }; @@ -1417,6 +1419,7 @@ angular.module('syncthing.core') $scope.currentFolder = angular.copy($scope.folderDefaults); $scope.editingExisting = false; $('#editIgnores textarea').val(""); + $scope.folderPathErrors = {}; $scope.folderEditor.$setPristine(); $http.get(urlbase + '/svc/random/string?length=10').success(function (data) { $scope.currentFolder.id = (data.random.substr(0, 5) + '-' + data.random.substr(5, 5)).toLowerCase(); @@ -1435,6 +1438,7 @@ angular.module('syncthing.core') $scope.currentFolder.selectedDevices[device] = true; $scope.editingExisting = false; + $scope.folderPathErrors = {}; $scope.folderEditor.$setPristine(); $('#editFolder').modal(); }; diff --git a/gui/default/syncthing/folder/editFolderModalView.html b/gui/default/syncthing/folder/editFolderModalView.html index 63f1fd069..6827d6af6 100644 --- a/gui/default/syncthing/folder/editFolderModalView.html +++ b/gui/default/syncthing/folder/editFolderModalView.html @@ -26,12 +26,12 @@
- Path to the folder on the local computer. Will be created if it does not exist. The tilde character (~) can be used as a shortcut for {{system.tilde}}
.
+ Path to the folder on the local computer. Will be created if it does not exist. The tilde character (~) can be used as a shortcut for {{system.tilde}}
.
The folder path cannot be blank.
- Warning, this path is a subdirectory of an existing folder "{%otherFolder%}".
- Warning, this path is a subdirectory of an existing folder "{%otherFolderLabel%}" ({%otherFolder%}).
- Warning, this path is a parent directory of an existing folder "{%otherFolder%}".
- Warning, this path is a parent directory of an existing folder "{%otherFolderLabel%}" ({%otherFolder%}).
+ Warning, this path is a subdirectory of an existing folder "{%otherFolder%}".
+ Warning, this path is a subdirectory of an existing folder "{%otherFolderLabel%}" ({%otherFolder%}).
+ Warning, this path is a parent directory of an existing folder "{%otherFolder%}".
+ Warning, this path is a parent directory of an existing folder "{%otherFolderLabel%}" ({%otherFolder%}).