Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-09

GetAppConfigFile() output issue

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

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 -

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 27 lines
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?

This is by design.

The Free Desktop Project's recommendations were used for the current implementation.

I assume that for symmetry reasons, you would like to see it the same in both ? :-)

Michael.

Show quoted text 36 lines
----------- 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 - _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote 10 lines
> Is this a oversight or by design? This is by design. The Free Desktop Project's recommendations were used for the current implementation. I assume that for symmetry reasons, you would like to see it the same in both ? :-)

:-) It's easy to work around this difference - though no need to really. I just wanted to confirm that it was by design.

Reply by email