The test for valid guids in the extension manager allows a trailing /.
Installation then fails when trying to create a directory with that name with
Error: [Exception... "Component returned failure code: 0x80520001
(NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.append]" nsresult: "0x80520001
(NS_ERROR_FILE_UNRECOGNIZED_PATH)" location: "JS frame ::
:: anonymous :: line 1085" data: no]
Created attachment 195570 [details] [diff] [review]
This patch simply removes the optional trailing slash from the regular
expression that is used to test for valid guids.
This is a pretty minor issue and should only really stop some confusion for
extension authors who might make the mistake.
Benjamin - was there a reason the ext id regexp allowed an optional '/' on the
end of the id?
Ben wrote the original regexp: IIRC, it was checking directory names and he was
having problems with a trailing slash. I'm hoping that we changed to use
leafnames since then.
Thanks and that makes sense. I had already verified it does use the leafName
everywhere the regexp is used so this should be good to go.
Checking in toolkit/mozapps/extensions/src/nsExtensionManager.js.in;
new revision: 1.153; previous revision: 1.152
Fixed on trunk.
Comment on attachment 195570 [details] [diff] [review]
asking for 1.8b5 so there is consistency for what are considered valid id's
between trunk and branch.
Checked in on MOZILLA_1_8_BRANCH
Checking in mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in;
new revision: 184.108.40.206; previous revision: 220.127.116.11
Thanks for the patch!