mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 07:12:27 +00:00
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.
This commit is contained in:
parent
b99dee3ac3
commit
a4a1231e92
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user