diff options
author | Jakob Borg <jakob@kastelo.net> | 2023-06-28 07:03:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 07:03:53 +0200 |
commit | a4a1231e92a58f5c08396aff4190e43b13b953a6 (patch) | |
tree | 89cf34abf3fc6fe084b6d184241ac4d5fe592f55 | |
parent | b99dee3ac31939d4fe0fb5c02e1c7949b2f5d20b (diff) | |
download | syncthing-a4a1231e92a58f5c08396aff4190e43b13b953a6.tar.gz syncthing-a4a1231e92a58f5c08396aff4190e43b13b953a6.zip |
gui: Remove tilde auto-expansions (fixes #8890) (#8954)
This removes the tilde expansion we had in the GUI. I'm not sure why we
had it, but there are valid reasons to have a folder path with tilde in
it in the config, and it was previously impossible to enter one of
those.
-rwxr-xr-x | gui/default/syncthing/core/syncthingController.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index a681eb8bc..208cb5617 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -740,20 +740,12 @@ angular.module('syncthing.core') } function pathJoin(base, name) { - base = expandTilde(base); if (base[base.length - 1] !== $scope.system.pathSeparator) { return base + $scope.system.pathSeparator + name; } return base + name; } - function expandTilde(path) { - if (path && path.trim().charAt(0) === '~') { - return $scope.system.tilde + path.trim().substring(1); - } - return path; - } - function shouldSetDefaultFolderPath() { return $scope.config.defaults.folder.path && $scope.folderEditor.folderPath.$pristine && $scope.editingFolderNew(); } @@ -1988,7 +1980,7 @@ angular.module('syncthing.core') if (!newvalue) { return; } - $scope.currentFolder.path = expandTilde(newvalue); + $scope.currentFolder.path = newvalue; $http.get(urlbase + '/system/browse', { params: { current: newvalue } }).success(function (data) { |