Explorar o código

gui: Don't remove the slash from path '/' (fixes #4983) (#4988)

Simon Frei %!s(int64=7) %!d(string=hai) anos
pai
achega
b670b5550a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      gui/default/syncthing/core/syncthingController.js

+ 1 - 1
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 = {};