Am 15.03.2011 12:45, schrieb Bart:
On 3/15/11, Peter Williams<[email protected]>  wrote:

ConfigIni := TIniFile.Create(ChangeFileExt(Application.ExeName,'.ini'));

You really should not do that in most OS's, even on Windows it is
deprecated since win9x.
Most times you will not have write permissions there.
Also under *nix this location might not be what you expect it to be...

Use GetAppConfigDir to determine where to put INI files.

It took me a while until I understand what you wanted to tell... maybe you should have mentioned directly that you mean "writing in the application's directory".

While I agree with you that modifyable configuration should be put into the proper configuration locations I personally see no problem with having a readonly configuration file in the application's directory (yes, I'm aware that this is not cross platform). So the problem could be that the INI file is always opened as "read/write", while at the beginning "read" should be sufficient. This could explain why TMemIniFile works for such cases.

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to