为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

I want to rename profile folder

  • 12 个回答
  • 1 人有此问题
  • 8 次查看
  • 最后回复者为 noitidart

more options

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?

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?

所有回复 (12)

more options

hello noitidart, yes this should work. just make sure that no firefox process is running during the renaming procedure...

more options

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.

more options

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.

more options

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.

more options

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.

more options

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

more options

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 :))

more options

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 :)

由noitidart于修改

more options

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.

more options

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.

more options

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>\
more options

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