[fpc-devel] ExtractFilePath and GetAppConfigDir issues

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Sep 12 12:44:57 CEST 2007


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