Looking for saved searches? click on "Search Bugs" above.
Status
()
People
(Reporter: Christian Persch (GNOME) (away; not receiving bug mail), Unassigned)
Tracking
Firefox Tracking Flags
(Not tracked)
Details
Attachments
(1 attachment)
|
11.05 KB,
patch
|
Benjamin Smedberg
:
review-
|
Details | Diff | Splinter Review |
Created attachment 284988 [details] [diff] [review] proposed patch On linux, both the profile root dir and the profile local root dir are ~/.vendor/appname . However, for my application I need to relocate the directory somewhere else: the desired directory is under ~/.config/appname (root) resp. ~/.cache/appname (local root) (following the XDG base dir spec), while vendor is "GNOME" which would result in both being under ~/.gnome . The solution I came up with is to extend nsXREAppData to allow passing an application dir provider to XRE_main (like passing one to XRE_InitEmbedding) and this app dir provider will be queried for these directories as XRE_USER[_LOCAL]_APP_DATA_DIR. If the app dir provider doesn't implement these keys, the code will fall back to the old directories (~/.vendor/appname on linux).
Attachment #284988 -
Flags: review?(benjamin)
Comment 1•10 years ago
|
||
I believe something like this was already implemented as bug 396209... what is the relationship between this patch and that one?
Updated•10 years ago
|
||
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•10 years ago
|
||
I think what bent implemented there will do this. To be fair, that landed very recently, and it's probably not documented anywhere.
| (Reporter) | ||
Comment 3•10 years ago
|
||
You're right that this is somewhat similar to bug 396209. (I had started this work before that bug landed, and didn't think it had anything to do with my problem.) It's not quite sufficient however: Specifying the Profile key in the .ini file will point both the profile root and the profile local root (cache files) to $HOME/$Profile. I on the other hand want to point them to different directories. Additionally, the directories are not static, but depend on environment variables ($XDG_CONFIG_HOME and $XDG_CACHE_HOME resp; ~/.config and ~/.cache are their fallback values). I can see two ways to fix my problem then: * Since the problem is Profile being relative to $HOME, add ProfileRoot and ProfileLocalRoot entries in the .ini (and nsXREAppData), which will be used to construct these directories as $Profile[Local]Root/$Profile and substitute env vars (with fallback! since those env vars may be unset; maybe in sh syntax ${VAR:-fallback}). * My approach above. Seems easier to me, but only works with XRE_main called from code, not with xulrunner + .ini file. I guess one could implement an app dir provider in nsAppData.cpp that takes its keys from a section of the .ini file... :)
Comment 4•10 years ago
|
||
Comment on attachment 284988 [details] [diff] [review] proposed patch It's too late in 1.9 for this new feature IMO, and this is all going to change in moz2. So I think this should be WONTFIX
Attachment #284988 -
Flags: review?(benjamin) → review-
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in
before you can comment on or make changes to this bug.
Description
•