[fpc-devel] GetAppConfigDir under Unices
Michalis Kamburelis
michalis at camelot.homedns.org
Thu Nov 10 20:38:30 CET 2005
Hi
I had some time today and I decided to write a simple patch that fixes
GetAppConfigDir, adhering to basedir-spec.
The arguments after adhering to basedir-spec are:
- The idea to place things within .config/ seems sensible.
- On my system (Debian testing) I see two things that adhere to it
(xfce4 and graveman), so the spec is not completely unknown.
So my patch follows Danny's advice and adheres to basedir-spec.
So GetAppConfigDir(false) and GetAppConfigFile(false, ...) behavior
changes to use $XDG_CONFIG_HOME or ~/.config/. The patch also fixes
GetAppConfigFile(false) behavior (ConfigExtension was not appended in
this case).
I'm attaching the patch to rtl/unix/sysutils.pp (done versus trunk, but
I think it should be merged with 2.0.1 branch too) as file
sysutils.patch, and I'm attaching a trivial test program
test_app_config_dir.pas to easily test GetAppConfigXxx
routines.
Michalis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sysutils.patch
Type: text/x-patch
Size: 1074 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20051110/f93bb540/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_get_app_config.pas
Type: text/x-pascal
Size: 515 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20051110/f93bb540/attachment.pas>
More information about the fpc-devel
mailing list