fix #keeweb/keeweb-connect#3: extension manifest file name

pull/1856/head
antelle 2021-05-01 19:20:14 +02:00
parent 5e727a3547
commit ea80bfae07
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 3 additions and 3 deletions

View File

@ -46,9 +46,9 @@ function getWindowsRegistryPath(browser) {
}
}
function getWindowsManifestFileName(browser) {
function getWindowsManifestFileName(browser, extension) {
const suffix = browser === 'Firefox' ? 'firefox' : 'chrome';
const manifestName = `native-messaging.${suffix}.json`;
const manifestName = `native-messaging-${extension.toLowerCase()}.${suffix}.json`;
return path.join(app.getPath('userData'), manifestName);
}
@ -140,7 +140,7 @@ module.exports.install = async function (browser, extension) {
return;
}
const manifestFileName = getWindowsManifestFileName(browser);
const manifestFileName = getWindowsManifestFileName(browser, extension);
await fs.promises.writeFile(manifestFileName, JSON.stringify(manifest, null, 4));
windowsRegistry.createKey(registryPath + registryKeyName, manifestFileName);