Closed Bug 863817 Opened 9 years ago Closed 4 years ago

mozprofile addons.py should check if a non-zipfile addon is a directory

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: k0scist, Unassigned)

References

Details

(Keywords: regression)

https://github.com/mozilla/mozbase/blob/master/mozprofile/mozprofile/addons.py#L151

Apropos https://bugzilla.mozilla.org/show_bug.cgi?id=790765#c19 . We
should have a sanity check that if the addon is not a zipfile, we
should ensure its a directory, since we join that with
`install.rdf`. (Additional sanity checks, like the existence of the
file, etc, wouldn't be horrible either.)

This *should* be a one-line fix.  However, os.isdir (IIRC) does not
work for symbolic links.  So os.realpath or similar should be used.
This indicates that this should probably be upstreamed to mozfile
(e.g. `def isrealdir` or the like) and that used.

Why oh why could python not just include a `follow_links` argument :(
This has been regressed by bug 797832.
Blocks: 797832
Keywords: regression
Having a test additionally for a non-existing file, and directory would be nice to cover such regressions in the future.
Flags: in-testsuite?
Mass closing bugs with no activity in 2+ years. If this bug is important to you, please re-open.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.