Browse Source

fix '~' completion in add folder (fix #1478)

Francois-Xavier Gsell 10 years ago
parent
commit
b95a6ccf80
2 changed files with 4 additions and 0 deletions
  1. 1 0
      AUTHORS
  2. 3 0
      gui/scripts/syncthing/core/controllers/syncthingController.js

+ 1 - 0
AUTHORS

@@ -21,6 +21,7 @@ Emil Hessman <[email protected]>
 Federico Castagnini <[email protected]>
 Federico Castagnini <[email protected]>
 Felix Ableitner <[email protected]>
 Felix Ableitner <[email protected]>
 Felix Unterpaintner <[email protected]>
 Felix Unterpaintner <[email protected]>
+Francois-Xavier Gsell <[email protected]>
 Gilli Sigurdsson <[email protected]>
 Gilli Sigurdsson <[email protected]>
 Jakob Borg <[email protected]>
 Jakob Borg <[email protected]>
 James Patterson <[email protected]> <[email protected]>
 James Patterson <[email protected]> <[email protected]>

+ 3 - 0
gui/scripts/syncthing/core/controllers/syncthingController.js

@@ -901,6 +901,9 @@ angular.module('syncthing.core')
         $scope.directoryList = [];
         $scope.directoryList = [];
 
 
         $scope.$watch('currentFolder.path', function (newvalue) {
         $scope.$watch('currentFolder.path', function (newvalue) {
+            if (newvalue && newvalue.trim().charAt(0) == '~') {
+                $scope.currentFolder.path = $scope.system.tilde + newvalue.trim().substring(1)
+            }
             $http.get(urlbase + '/system/browse', {
             $http.get(urlbase + '/system/browse', {
                 params: { current: newvalue }
                 params: { current: newvalue }
             }).success(function (data) {
             }).success(function (data) {