Sign in Join

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

Mailing lists / fpc-devel / 2005-12

GetAppConfigDir and GetAppConfigFile output

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Felipe Monteiro de Carvalho

Hello,

I recently tryed to use those two functions, so I created a test app with 4 functions:

  WriteLn(GetAppConfigDir(True));
  WriteLn(GetAppConfigDir(False));
  WriteLn(GetAppConfigFile(True));
  WriteLn(GetAppConfigFile(False));

The output on a GNU/Linux system:

/etc
/home/felipe/project1
/etc/project1.cfg
/home/felipe/.project1

Is the output for non global configurations correct?

Shoudn't it be:

/etc
/home/felipe/.project1
/etc/project1.cfg
/home/felipe/.project1.cfg

I never see programs create folders without the dot on the home directory. This surely would be an unconvenient behavior.

The output is the same on 2.0.0 and 2.0.2

Felipe Monteiro de Carvalho

Reply by email

Michalis Kamburelis
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 32 lines
Hello, I recently tryed to use those two functions, so I created a test app with 4 functions: WriteLn(GetAppConfigDir(True)); WriteLn(GetAppConfigDir(False)); WriteLn(GetAppConfigFile(True)); WriteLn(GetAppConfigFile(False)); The output on a GNU/Linux system: /etc /home/felipe/project1 /etc/project1.cfg /home/felipe/.project1 Is the output for non global configurations correct? Shoudn't it be: /etc /home/felipe/.project1 /etc/project1.cfg /home/felipe/.project1.cfg I never see programs create folders without the dot on the home directory. This surely would be an unconvenient behavior. The output is the same on 2.0.0 and 2.0.2 -- Felipe Monteiro de Carvalho

Some time ago I sent a patch that fixes this, it was applied to FPC 2.1.1 and 2.0.3. Unfortunately it didn't make it to 2.0.2 release. See this thread on fpc-devel:

Michalis

Reply by email

Michael Van Canneyt
to Felipe Monteiro de Carvalho: I recently tryed to use those two functions, so I created a test app with 4 functions:…
Felipe Monteiro de Carvalho wrote 30 lines
Hello, I recently tryed to use those two functions, so I created a test app with 4 functions: WriteLn(GetAppConfigDir(True)); WriteLn(GetAppConfigDir(False)); WriteLn(GetAppConfigFile(True)); WriteLn(GetAppConfigFile(False)); The output on a GNU/Linux system: /etc /home/felipe/project1 /etc/project1.cfg /home/felipe/.project1 Is the output for non global configurations correct? Shoudn't it be: /etc /home/felipe/.project1 /etc/project1.cfg /home/felipe/.project1.cfg I never see programs create folders without the dot on the home directory. This surely would be an unconvenient behavior. The output is the same on 2.0.0 and 2.0.2

Strange. It should even be
/etc
/home/felipe/.config/project1
/etc/project1.cfg
/home/felipe/.config/project1

I'll have a look.

Michael.

Reply by email