Closed
Bug 291792
Opened 20 years ago
Closed 20 years ago
"undefined" folder created because installDroppedInFiles doesn't check for return value of getIDForLocation
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
People
(Reporter: asqueella, Assigned: robert.strong.bugs)
References
Details
(Whiteboard: [steps to repro in comment 2])
Attachments
(2 obsolete files)
This code is wrong (installDroppedInFiles function, nsExtensionManager.js):
--
var id = location.getIDForLocation(entry);
actualItems[id] = entry;
--
Should be
--
var id = location.getIDForLocation(entry);
if(!id)
continue;
actualItems[id] = entry;
--
The symptoms are: put a "{3f0da09b-c1ab-40c5-8d7f-53f475ac3fe8}~" (i.e. not a
GUID) file pointing to a correct extension location in profile/extensions.
Firefox creates an "undefined" folder in profile/extensions and says in the JS
console it tries to register item with ID=undefined.
Comment 1•20 years ago
|
||
Patches welcome!
Flags: blocking-aviary1.1+
QA Contact: bugs → benjamin
Whiteboard: [does not block 1.1a]
Reporter | ||
Comment 2•20 years ago
|
||
dang. Scratch that. Steps to reproduce are simpler: just create a non-GUID named
folder in extensions/ with install.rdf in it.
Why not just read the ID from install.rdf? That would allow for simpler folder
names, as some people prefer. If you want to save time on parsing install.rdf
you could create a plaintext file with GUID inside the folder and then first try
to read from it.
I'd make a patch if I had a tree.
Gavin? ;-)
Comment 3•20 years ago
|
||
Attachment #181815 -
Flags: review?(bugs)
Reporter | ||
Comment 4•20 years ago
|
||
Similar fix appears to be included in attachment 181795 [details] [diff] [review] (second patch in bug
291831).
Comment 5•20 years ago
|
||
Based on comment #4 and the fact that the second patch in 291831 has landed, is
this bug fixed?
Reporter | ||
Comment 6•20 years ago
|
||
Comment on attachment 181815 [details] [diff] [review]
Patch (untested)
Seems so, but I don't have a recent build. If anyone can confirm this is fixed,
please mark it as such. Removing obsolete review request, sorry for wasting
your time, Gavin.
Attachment #181815 -
Flags: review?(bugs)
Updated•20 years ago
|
Attachment #181815 -
Attachment is obsolete: true
Reporter | ||
Comment 7•20 years ago
|
||
Nope, not fixed.
Whiteboard: [does not block 1.1a] → [does not block 1.1a] [steps to repro in comment 2]
Comment 8•20 years ago
|
||
(In reply to comment #3)
> Created an attachment (id=181815) [edit]
> Patch (untested)
>
Gavin, your approach is correct. Would you please attach new patch?
Comment 9•20 years ago
|
||
This should be OK, since getIDForLocation clearly can return undefined, but I'm
not able to actually test it, nor have I taken the time to really understand
any of this code.
Attachment #182594 -
Flags: review?(bugs)
Comment 10•20 years ago
|
||
robert, can you look at this patch and see if it can be updated?
Assignee: bugs → rob_strong
![]() |
Assignee | |
Comment 11•20 years ago
|
||
Gavin or Nickolay (if you are around) - could you check if you are able to still
reproduce this bug? I just tried and it did not create an undefined folder for
me when using the steps in comment #0. Thanks - if I can find the time I'll
verify it also by inspecting the code.
![]() |
Assignee | |
Comment 12•20 years ago
|
||
Comment on attachment 182594 [details] [diff] [review]
Unbitrotted
Benjamin - this patch from gavin.sharp does fix the problem as stated in
comment #2 by skipping invalid id's and it still applies.
Attachment #182594 -
Flags: review?(bugs) → review?(benjamin)
Updated•20 years ago
|
Attachment #182594 -
Flags: review?(benjamin)
Attachment #182594 -
Flags: review+
Attachment #182594 -
Flags: approval-aviary1.1a2+
Updated•20 years ago
|
Whiteboard: [does not block 1.1a] [steps to repro in comment 2] → [checkin needed] [steps to repro in comment 2]
Updated•20 years ago
|
Whiteboard: [checkin needed] [steps to repro in comment 2] → [checkin needed][a+] [steps to repro in comment 2]
Comment 13•20 years ago
|
||
Comment on attachment 182594 [details] [diff] [review]
Unbitrotted
mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in 1.118
Attachment #182594 -
Attachment is obsolete: true
Whiteboard: [checkin needed][a+] [steps to repro in comment 2] → [steps to repro in comment 2]
Updated•20 years ago
|
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•