Re: [AD] Finding the current directory path

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 14-Dec-08, at 3:57 PM, Colin Ward wrote:
Amiga OS predates Windows, Linux and Mac OS. Mabye it is they that are
broken?

The first version of Amiga OS seems to be from 1985 (source: wikipedia), so it predates neither DOS nor UNIX - or even Mac OS for that matter. The first version of Windows also dates from 1985. Only the first of those are even remotely relevant in this context though. So I wouldn't suggest arguing from the position of which system came first - it's pretty much irrelevant anyway.

Fact of the matter is: all major current operating systems recognise '.' as the current directory and '/' as a path separator.

Is VMS broken as well for using strange paths?  Or Mac OS <= 9?

Well, it'd definitely makes them cumbersome to work with. Versions of Mac OS prior to 9 are completely irrelevant to any discussion though.

The fact is that some operating systems are different.

Yup - and we'll need to deal with that.

Now does anyone have
any suggestions about how to support this case genrically?  Is there a
reason why we can't just change the "./" to "" in this case?

Probably not. "filename" should be equivalent to "./filename" anyway and both would work if you stuck another path in front of them. So I'd recommend simply removing "./" where it's not needed. Do make a thorough check that it doesn't break anything though, just in case.

Good luck!

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/