diff --git a/src/background.js b/src/background.js index 26c8e792..046e061e 100644 --- a/src/background.js +++ b/src/background.js @@ -870,7 +870,7 @@ function hostAction(settings, action, params = {}) { async function parseFields(settings, login) { var response = await hostAction(settings, "fetch", { storeId: login.store.id, - file: login.login + ".gpg", + file: login.loginPath, }); if (response.status != "ok") { throw new Error(JSON.stringify(response)); // TODO handle host error diff --git a/src/helpers.js b/src/helpers.js index 9e92dd31..65f8bd8c 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -87,10 +87,14 @@ function prepareLogins(files, settings) { for (let storeId in files) { for (let key in files[storeId]) { // set login fields + const loginPath = files[storeId][key]; + // remove the file-type extension + const loginName = loginPath.replace(/\.[^.]+$/u, ""); const login = { index: index++, store: settings.stores[storeId], - login: files[storeId][key].replace(/\.gpg$/i, ""), + login: loginName, + loginPath: loginPath, allowFill: true, };