[Lazarus] GetAppConfigFileUTf8

Reinier Olislagers reinierolislagers at gmail.com
Wed Jun 27 21:11:18 CEST 2012


On 27-6-2012 18:27, Mattias Gaertner wrote:
> On Tue, 26 Jun 2012 10:11:56 +0200
> Reinier Olislagers <reinierolislagers at gmail.com> wrote:
>> On 26-6-2012 10:06, Mattias Gaertner wrote:
>>> On Mon, 25 Jun 2012 18:14:54 +0200
>>> Reinier Olislagers <reinierolislagers at gmail.com> wrote:
>>>> Suppose I'm using
>>>> FConfigFileName:=GetAppConfigFileUTF8(false);
<snip>
>>>>
>>>> I changed the code to this:
>>>>   // Make sure the directory exists. Let's hope
>>>>   // GetappConfigDirUTF8 and the file version give the same directory.
>>>>   ForceDirectoriesUTF8(GetAppConfigDirUTF8(false));
>>>>   FConfigFileName:=GetAppConfigFileUTF8(false);
>>>> Wouldn't it be easier to have another function that just gives a
>>>> guaranteed to exist filename?
>>>
>>> Do you mean a function that automatically creates the file and if
>>> it fails raises an exception?
> I added a parameter.
> 
Thanks, Mattias... I'll test it once trunk builds again ;)






More information about the Lazarus mailing list