I want to rename profile folder
When i rename profile, it just changes the name in Profiles.ini. if i rename profile directory, and update the path in Profiles.ini file will it be ok?
Todas as respostas (12)
hello noitidart, yes this should work. just make sure that no firefox process is running during the renaming procedure...
Thanks philipp for the reply. If I changed JUST the name of the profile - so like i set name in Profiles.ini to the new name - is it ok if firefox is running?
I was wondering what code on mxr is your reply based on?
Thanks philipp this helps alot.
i'm not aware of where this is handled in the codebase, however i can attest from past experience that it will work this way.
Ah ok thanks man. Because I created an addon "Profilist" based on it is ok to change the name in profiles.ini while that profile is running. Is this ok to assume?
For renaming folder path, I'll assume firefox cannot be running.
ok, now when you say that you want to use that for such a broad purpose i'm becoming a bit unsure again if it's sufficient to base such a feature only on my personal experience (though i have also observed the behaviour with a porcess monitor utility and that showed that firefox only accesses the profiles.ini at the start of a sessions and not anymore afterwards or on shutdown). so it's probably really safer to find the code in mxr which handles the profile related steps...
renaming the folder while firefox is running won't work in any case though, since there will be a number of files in it that are in use by the firefox process.
Thanks very much for that detail. Especially telling me that you used a process monitor to find that profiles.ini was only access at start of browser.
I tried renaming the folder just manually on a junk profile, and it worked without errors, it wasnt locked or anything. I just don't know what is going on internally, it probably is erroring lots of things internally. I'll keep looking I don't understand lots of the code as it's C++.
Thanks again man
also had a look at your addon - it's pretty great so far & could also be very handy for us here providing support for quickly switching back and forth between configurations. congrats :))
thanks man! :) thx for that input that it could help you guys out here! i love to help out. im working on a bunch of bug fixes, got almost all of them done hope to release version 1.1 tonight :)
Modificado por noitidart a
Why do you want to change the name of the profile folder on disk and why is it not sufficient to only change the name as shown in the Profile Manager?
Note that it is not recommended to change the file name of the profile on disk as there might be references to the absolute path is some of the files in a profile.
Note that there is also the second profile folder location for the cache files that would still be left if you didn't rename that folder as well.
Thanks cor-el for that detail. The second profile folder is the one located in local profile directory correct?
Some developers use my addon and when they go looking for their profile folder they can't find it so easily because when I create the profile I use a default name plus a number. So I was hoping to change the folder name at same time so these advanced users can find the folder that goes along with the profile name.
On XP that should be in Local Settings:
- C:\Documents and Settings\<user>\Local Settings\Application Data\Mozilla\Firefox\Profiles\<profile>\
- C:\Users\<user>\AppData\Local\Mozilla\Firefox\Profiles\<profile>\
Thanks, the way i get it per os is use this code:
profToolkit.rootPathDefault = FileUtils.getFile('DefProfRt', []).path; profToolkit.localPathDefault = FileUtils.getFile('DefProfLRt', []).path;
Do you know where in the profile i can find references to the absolute path? Maybe i can update them all