Please keep the discussion on-list.

2009/3/10 Clancy <clanc...@cybec.com.au>

> Hi,
>
> After I posted my message to the group today I realised that my program
> achieves its
> almost infinite flexibility by loading different include files in different
> circumstances,
> and from many different parts of the program.  The program always specifies
> the location
> of the include file by the relative path from the root directory.   If the
> uncertainty
> about the current working directory you worry about were really a problem
> this would never
> work, but I have been doing this for well over a year, and had never had
> any problems.
>

Just because you haven't experienced a problem with the way you do things
yet it certainly doesn't mean the problem isn't there. You're not specifying
the location of an include file relative to the home directory, it's
relative to the current working directory which is not necessarily the
directory you expect it to be.

At the end of the day you need to do what you're comfortable with, and if
you're happy relying on the current working directory being what you expect
it to be then I wish you the best of luck. Personally I will never do that
again because a bad experience that involved the need to change hundreds of
lines of code have taught me that it's not a safe bet.

But feel free to ignore me.

-Stuart

-- 
http://stut.net/

Reply via email to