Expose and use path separator (fixes #1163)

This commit is contained in:
Audrius Butkevicius
2014-12-14 23:12:12 +00:00
parent 5d173168cc
commit a2070d9ce4
4 changed files with 8 additions and 4 deletions

View File

@@ -889,6 +889,9 @@ angular.module('syncthing.core')
$scope.editFolder = function (folderCfg) {
$scope.currentFolder = angular.copy(folderCfg);
if ($scope.currentFolder.Path.slice(-1) == $scope.system.pathSeparator) {
$scope.currentFolder.Path = $scope.currentFolder.Path.slice(0, -1);
}
$scope.currentFolder.selectedDevices = {};
$scope.currentFolder.Devices.forEach(function (n) {
$scope.currentFolder.selectedDevices[n.DeviceID] = true;