diff --git a/js/app/controllers/credential.js b/js/app/controllers/credential.js index a20bf68a..b6d9b63e 100644 --- a/js/app/controllers/credential.js +++ b/js/app/controllers/credential.js @@ -468,7 +468,7 @@ }; $rootScope.$on('updateFolderInMainList', function (evt, updated_credential) { - + CredentialService.decryptCredential(updated_credential); for (var i = 0; i < $scope.active_vault.credentials.length; i++) { if($scope.active_vault.credentials[i].guid === updated_credential.guid){ $scope.active_vault.credentials[i]=updated_credential; diff --git a/js/app/directives/folderpicker.js b/js/app/directives/folderpicker.js index 23e8fdbf..d2b4fb18 100644 --- a/js/app/directives/folderpicker.js +++ b/js/app/directives/folderpicker.js @@ -49,6 +49,11 @@ }; scope.save = function() { + while(scope.currentFolder.includes('//')){ + _credential.folderpath=_credential.folderpath.replace("//", "/"); + } + scope.credential.folderpath = scope.currentFolder; + CredentialService.updateCredential(scope.credential).then(function (updated_credential) { NotificationService.showNotification($translate.instant('folderpath.moved'), 5000); $rootScope.$broadcast('updateFolderInMainList', updated_credential); diff --git a/js/app/services/folderservice.js b/js/app/services/folderservice.js index d4fe72c9..68a98837 100644 --- a/js/app/services/folderservice.js +++ b/js/app/services/folderservice.js @@ -49,6 +49,10 @@ angular.module('passmanApp') var _credential = CredentialList[i]; if (_credential.folderpath !== null) { + while(_credential.folderpath.includes('//')){ + _credential.folderpath=_credential.folderpath.replace("//", "/"); + } + console.log(_credential.folderpath); if (String(_credential.folderpath).startsWith(String($scope.currentFolder)) || update) { if ($scope.FolderList.indexOf(_credential.folderpath) <= -1) { $scope.FolderList.push(_credential.folderpath);