Closed
Bug 990455
Opened 11 years ago
Closed 11 years ago
nsIToolkitProfileService selectedProfile doesn't return the currently in use profile
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: noitidart, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140330004001
Steps to reproduce:
open different profiles and copy paste this into scratchpad and run it with environemnt browser.
var tps = Cc['@mozilla.org/toolkit/profile-service;1'].createInstance(Ci.nsIToolkitProfileService); //toolkitProfileService
var me = Services.wm.getMostRecentWindow(null);
me.alert(tps.selectedProfile.name);
Actual results:
it always gives me the same profile name as it states on the MDN documentatoin page: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIToolkitProfileService#Attributes
im thinking its giving me the profile that has Default=1 set in Profiles.ini im not sure though
Expected results:
it should return the name of the profile the code is running from
Updated•11 years ago
|
Component: Untriaged → Startup and Profile System
Product: Firefox → Toolkit
Comment 1•11 years ago
|
||
This API gives you the default profile, not the current one.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Can you advise me on a method to get the currently in use profile please
Comment 3•11 years ago
|
||
Get ProfDS from the directory service. This gives you the path of the current profile, which may not be a profile in the profile-service at all, since people can start with an arbitrary profile directory using the -profile flag.
You need to log in
before you can comment on or make changes to this bug.
Description
•