From b670b5550a461699135214cbc2a4e15a2f064dfc Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Tue, 5 Jun 2018 23:47:47 +0200 Subject: [PATCH] gui: Don't remove the slash from path '/' (fixes #4983) (#4988) --- gui/default/syncthing/core/syncthingController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 83256523..69292f32 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1548,7 +1548,7 @@ angular.module('syncthing.core') $scope.editFolder = function (folderCfg) { $scope.editingExisting = true; $scope.currentFolder = angular.copy(folderCfg); - if ($scope.currentFolder.path.slice(-1) === $scope.system.pathSeparator) { + if ($scope.currentFolder.path.length > 1 && $scope.currentFolder.path.slice(-1) === $scope.system.pathSeparator) { $scope.currentFolder.path = $scope.currentFolder.path.slice(0, -1); } $scope.currentFolder.selectedDevices = {};