Fix add-on install error message when file is entirely invalid

If the file wasn't an XPI at all, or it didn't contain valid metadata for fx102,
the error message would previously show "%S" where the add-on name should be.
Now we fall back to the file path.
This commit is contained in:
Abe Jellinek 2023-05-08 20:13:47 +03:00
parent b30f97dad5
commit 8c37865c07

View file

@ -959,7 +959,7 @@ const gXPInstallObserver = {
Zotero.alert(
null,
Zotero.getString("standalone.addonInstallationFailed.title"),
Zotero.getString("standalone.addonInstallationFailed.body", installs[0].name));
Zotero.getString("standalone.addonInstallationFailed.body", [installs[0].name || installs[0].file.path]));
break;
/*case "addon-install-started":
case "addon-install-complete":*/