[patch] XDG dirs on Windows - Akonadi data/config as an example

Jaroslaw Staniek js at iidea.pl
Wed Aug 13 11:47:43 CEST 2008


Ralf Habacker said the following, On 2008-08-13 10:27:
> Jaroslaw Staniek schrieb:
>> hi
>> This is not quite topic for kde-windows; it rather belongs to lower 
>> level.
>> But we tend to rather carefully select our dirs, so:
>>
>> The base dir defined by XDG specs is $HOME, and subdirs are hidden, e.g.
>> .config, .local.
>> On Windows we have $APPDATA and $HOME, and I would say the former is 
>> preferred
>> to flood with subdirs.
>> While trying to make Akonadi run on Windows flawlessy (it required mysql
>> server instance) and looking at current
>> kdesupport/akonadi/libs/xdgbasedirs.cpp, in particular 
>> XdgBaseDirs::homePath()
>> method,  I can see that the config dirs are computed as follows:
>>
>> 1. if $XDG_CONFIG_HOME exists, it's used; $HOME is prepended if
>> $XDG_CONFIG_HOME is not absolute.
>> 2. if $XDG_CONFIG_HOME is empty; $HOME is selected as the base dir.
>> 3. to the result of 1. or 2., subdir name is added, e.g. .config or 
>> .local.
>>
>> Now on Windows it means you'd end up with cryptic .config and .local 
>> files not
>>   really related to the operating system specs, when hidden files are not
>> denoted by the leading dot.
>>
>> My proposal is to use $APPDATA/XDG/ or if $APPDATA is empty, 
>> $HOME/XDG/ as
>> default (i.e. when expected $XDG_* variable is empty).
> not better using lower case ?  mostly dirs are lower case ?

I can see dirs use CamelCase or Upper Case in $APPDATA, e.g. VirtualStore or 
Temporary Internet Files...

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
  KDE Libraries for MS Windows (http://windows.kde.org)


More information about the Kde-windows mailing list