[fpc-devel] Bug in GetAppConfigDir(True) on unix systems!
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Aug 7 11:30:32 CEST 2008
Hi,
Calling GetAppConfigDir(True) returns the wrong results...
In my application I expected....
/etc/<AppName>/
but instead it returned
/etc<AppName>/
Note the missing directory separator!
---------------[ rtl/unix/sysutils.pp ]-------------------
Function GetAppConfigDir(Global : Boolean) : String;
begin
If Global then
Result:=SysConfigDir
else
Result:=XdgConfigHome;
if VendorName<>'' then
Result:=IncludeTrailingPathDelimiter(Result+VendorName); //<===
No dir separator???
Result:=IncludeTrailingPathDelimiter(Result+ApplicationName);
//<=== No dir separator???
end;
SysConfigDir is set to '/etc' for unix systems. No trailing directory
separator.
Above I indicated two places where the directory separator must be
added. I'm using FPC 2.2.3 r11214.
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the fpc-devel
mailing list