[Libreoffice] XDG config migration

Petr Mladek pmladek at suse.cz
Tue Dec 6 10:57:06 PST 2011


Tomáš Chvátal píše v Po 05. 12. 2011 v 10:40 +0100:
> Hi guys,
> 
> After updating to 3.5 quite few people reported that their
> configuration is gone and they have default setup.
> 
> The reason for this is that 3.5 now uses XDG spec
> ~/.config/libreoffice instead of ~/.libreoffice. Simple copy of later
> folder to replace the former one solved the issued for everyone.

Strange, it seems that the original ~/.libreoffice/3 path is checked
here.

AFAIK, the important code is in desktop/source/migration/migration.cxx
in MigrationImpl::findInstallation. I printed the checked  aUserInst
paths and got:

	file:///home/pmladek/.libreoffice/3
	file:///home/pmladek/.openoffice.org/3

I see that it even creates the file ~/.libreoffice/3/MIGRATED.
Well, I am not sure if it really migrates the options.

Hmm, we do not set XDG_CONFIG_HOME on SLED11-SP1. It will not work if we
set it because it will not remove .config from the path, see:

--- cut ---
            if ( !pXDGCfgHome &&
aUserInst.endsWithAsciiL( XDG_CONFIG_PART, sizeof( XDG_CONFIG_PART ) -
1 )  )
                aUserInst = aUserInst.copy( 0, aUserInst.getLength() -
sizeof(  XDG_CONFIG_PART ) + 2 ); // remove trailing '.config' ( but
leave the terminating '/' )
--- cut ---

Do you set XDG_CONFIG_HOME in Gentoo?

IMHO, we should check both prefixes: $XDG_CONFIG_HOME and $HOME in all
cases.


Best Regards,
Petr



More information about the LibreOffice mailing list