IFileList, . , and ..

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
tom
Posts: 3
Joined: Wed Apr 14, 2004 6:05 pm
Location: Dallas, Texas
Contact:

IFileList, . , and ..

Post by tom »

Not sure where this goes so i'm sticking my comment here in the bug reports. Someone correct me if i should be posting this elsewhere.

IFileList will return the "." and ".." special directory entries which represent the current working directory and the parent of the working directory. My complaint/question/bug is i think there is little or no need for file list to return these by default.

In most cases the user is looking for a file ( by extension or some other wildcard ) in the directory and recursing thru folders. Unless they specificly deal with these special entries they will end up with broken code. In that respect i think that the default behavior should be to not return them in the file list.

I propose the IFileSystem API be changed to...

Code: Select all

virtual IFileList* createFileList( bool workingDirectories ) = 0;
I have an implementation of this fix if you want it Niko.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Yep, useful suggestion, you are right. On my list. :)
Post Reply