[fpc-devel] GetAppConfigFile() output issue

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Sep 12 11:54:57 CEST 2007


Hi

I created a simple console application that executes the following commands...


  writeln('GetAppConfigDir(False);');
  writeln('   ' + GetAppConfigDir(False));
  writeln('GetAppConfigFile(False);');
  writeln('   ' + GetAppConfigFile(False));
  writeln('ApplicationName');
  writeln('   ' + ApplicationName);


Below is the output on Windows and Linux.  I think there is a
inconsistency between the output for GetAppConfigFile(False) under
both platforms.

I assume 'Application Data' under Windows is equivalent to '.config'
under Linux. If so then...

Under Windows it includes a directory equivalent to the application
name or GetAppConfigDir(False) and then the *.cfg file.

Under Linux in contains one directory less. The directory equivalent
to the application name is missing.

Is this a oversight or by design?



-----------  Windows 2000  -----------------
GetAppConfigDir(False);

   C:\Documents and Settings\Graeme\Local Settings\Application Data\project1

GetAppConfigFile(False);

   C:\Documents and Settings\Graeme\Local Settings\Application
Data\project1\project1.cfg

ApplicationName

   project1




-----------   Linux  -----------------------
GetAppConfigDir(False);
   /home/graemeg/.config/project1
GetAppConfigFile(False);
   /home/graemeg/.config/project1.cfg
ApplicationName
   project1



Regards,
  - Graeme -



More information about the fpc-devel mailing list