[fpc-devel] Re: ExtractFilePath and GetAppConfigDir issues

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Sep 12 12:47:09 CEST 2007


Oh, and here is another one!

ExtractFileDir  which to me does the exact same thing as
ExtractFilePath, but this one has NO ending directory separator.

Graeme.



On 12/09/2007, Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:
> Hi,
>
> I find the following inconsistent and have to constantly check for
> ending path delimiters because I am never sure which functions include
> them and which doesn't.
>
>
> Both the following functions returns a path, yet one includes a
> trailing path delimiter and the other doesn't!  Why can't all
> functions that return a path include or exclude the trailing path
> delimiter.  A mix of the two is just plain annoying!
>
>
> GetAppConfigDir(False)
>   returns:  /home/graemeg/.config
>
> ExtractFilePath('/home/graemeg/.config/testing.xml')
>   returns:  /home/graemeg/.config/
>
>
> Why does one have a trailing '/' and the other not?  They are both paths!
>
>
> Regards,
>   - Graeme -
>



More information about the fpc-devel mailing list