Expose and use path separator (fixes #1163)

This commit is contained in:
Audrius Butkevicius committed 2015-01-10 14:51:29 +00:00
1 parent 5d173168cc
commit a2070d9ce4
4 files changed
+8 -4

No files matched your search

@@ -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;