User Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20100101 Firefox/17.0 Build ID: 20130107124423 Steps to reproduce: The nsiPrefBranch method deleteBranch() does weird things when a trailing dot is involved. Actual results: deleteBranch("myBranch") works fine and deletes "myBranch" and well as "myBranch.leaf". deleteBranch("myBranch.") (single trailing dot) deletes "myBranch.leaf", but also deletes "myBranch" even though it has no trailing dot. deleteBranch("myBranch..") (two trailing dots) doesn't delete "myBranch" but does delete "myBranch.leaf" even though it does not contain two dots. Expected results: I would have thought that the parameter to deleteBranch() should be treated as an exact initial string match to the preferences, not modified by adding or removing dots. Just possibly if dots are to be treated as a syntax rather than just part of the string, then all trailing dots should be stripped. There are comments in the code implying that this behaviour is related to an attempt to be compatible with the old nsIPref interface. Dots are, sometimes, added in deleteBranch(), and then presumably removed somewhere deeper in the code.
Component: Untriaged → Preferences: Backend
Product: Firefox → Core
I'm going to mark this NEW because there's definitely some weird fiddling going on. I think that the correct behavior should be: deleteBranch("myBranch") should remove "myBranch" and "myBranch.child" but not "myBranch2" or "myBranch2.child" deleteBranch("myBranch.") should delete "myBranch.child" but not "myBranch" deleteBranch("myBranch..") should probably throw an invalid-argument exception.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Whiteboard: [bugday-20131002] → [bugday-20131002][lang=c++]
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Last Resolved: 18 hours ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.