[Libreoffice] [PUSHED] [PATCH] fdo#32263 - Config file location
Noel Power
nopower at novell.com
Thu Jun 9 08:36:53 PDT 2011
Annoyingly it seems my mailer broke and my reply didn't send ( or I
don't see it yet because of still other mail problems ) so I apologise
if you are getting this multiple times
Hi Petr
On 09/06/11 13:46, Petr Mladek wrote:
> Noel Power píše v St 08. 06. 2011 v 17:36 +0100:
[...]
> Hmm, I am not sure if we want to hardcode "/.config". If I understand it
> correctly, there might be any path defined by XDG_CONFIG_HOME
> environment variable. It could be even /tmp/test/.blabla
yes, but here we are dealing with the case where XDG_CONFIG_HOME is not
set. The patch mentioned in this thread sets the default config
directory to $HOME/.config when XDG_CONFIG_HOME is not set
> BTW: Is the XDG_CONFIG_HOME support a new feature?
no, not sure how long it is around but not new
> I thought that the
> user configuration directory is defined
> in /opt/libreoffice/program/bootstraprc. It is currently defined as:
>
> UserInstallation=$SYSUSERCONFIG/.libreoffice/3
afaik the XDG_CONFIG_HOME variable determines the value returned for the
placeholder '$SYSUSERCONFIG'
> I wonder if we could use $SYSUSERCONFIG to determine the default root
> path where to serch for older configuration folders.
>
> If the XDG_CONFIG_HOME is an older feature. We should use
> getenv('XDG_CONFIG_HOME') to find another root where to search for
> older configurations.
not quite, but you are correct in that we should check if
XDG_CONFIG_HOME is set, if it is then really things are as they were
before and we don't imo need to do anything. Of course there is an
argument that there is an existing bug where if you set XDG_CONFIG_HOME
then also no userprofile migrations will happen. But I think that case
is somewhat different because someone makes a conscious choice to change
the config dir. In this case however ( because of the patch ) we have a
situation where there is an enforced config directory location change.
> Best Regards,
> Petr
>
>
> PS: BTW: Why have you used
> aUserInst = aUserInst.copy( 0, aUserInst.getLength() - sizeof(
> XDG_CONFIG_PART ) + 2 );
>
> I would expect +1 instead of +2. But I am newer 100% sure about this
> without testing ;-)
yeah but the XDG_CONFIG_PART contains the leading '/' which I wanted to
retain. But of course it's possible it isn't necessary and maybe it gets
added anyway ( to be honest I didn't check and erred on the side of
caution ). When I get a chance I'll check and change it ( and add the
check for getenv ) ) Still interested in any other thoughts about the
whole thing
thanks
Noel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110609/777db695/attachment.html>
More information about the LibreOffice
mailing list