[fpc-devel] GetAppConfigDir confusion

Michael Van Canneyt michael at freepascal.org
Tue Jul 29 12:15:22 CEST 2008



On Tue, 29 Jul 2008, Ales Katona wrote:

> Michael Van Canneyt  wrote / napĂ­sal(a):
> > On Tue, 29 Jul 2008, Ales Katona wrote:
> >
> >   
> > > It seems that currently, GetAppConfigDir performs rather incosistently.
> > >
> > > On Unix, it returns path with trailing pathdelim, on windows it returns
> > > path
> > > with random trailing path delim (depends on which branch, see code).
> > >
> > > What should it be then?
> > >
> > > Considering the importance of this function to programs, it's changes
> > > along
> > > versions (e.g: 2.2.0 vs 2.2.2 vs soon-to-be-trunk) I think we need to
> > > document
> > > the behaviors per-version so people can decide if it's even viable to use
> > > atm.
> > > (I got burned).
> > >
> > > So.. questions are:
> > > 1. trailing pathdelims, yes or no? (of course only if there's something to
> > > return)
> > >     
> >
> > What is the most logical according to you ?
> >   
> 
> I think the pathdelim should be there so people can simply add name of their
> file to it. That's how it currently works in unix, and I think it's the most
> logical solution. Loesje said he'll look into it but I can help, after someone
> confirms which way to go :)

Well, I think adding it is indeed the most logical. 
Probably the confusing windows situation is the result of some bug fix not
being merged correctly.

I'll add a warning that prior to 2.2.2, the behaviour may be inconsistent.

Michael.


More information about the fpc-devel mailing list