Re: [AD] al_findfirst() win2k.

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


> There's definately something wrong with al_findfirst. I'm using Win2k, but
> if I pass 0 for the attributes, it only returns files with no attributes
> set - under a normal DOS find, that used to list all archive and read-only
> files as well.

Yep, but not with our own al_findfirst() which precisely works around that DOS 
limitation: if you pass 0, you only get files with no attributes set.

> Passing -1 does make it work for me - but could this lead to strange bugs
> when someone else runs the game on their Win98 system, or is -1 a safe
> value to use all round?

You can safely use -1 on all systems (which is actually 0xffffffff), but this 
won't allow you to filter any files.

> A possible problem is this attribute which win2k uses to specify a normal
> file with no attributes set:
> #define FILE_ATTRIBUTE_NORMAL        0x00000080

Thanks! I'm going to unconditionally add it to the underlying bitmask.

-- 
Eric Botcazou



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