[AD] [ alleg-Bugs-1475932 ] al_findfirst fails to find read-only or archive files

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


Bugs item #1475932, was opened at 2006-04-24 22:41
Message generated for change (Comment added) made by konforce
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=1475932&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: 4.2.0rc2
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: al_findfirst fails to find read-only or archive files

Initial Comment:
In wfile.c, al_findfirst(), there is this snippet:

ff_data->attrib = attrib | 0xFFFFFF00;

   ff_data->handle = _findfirst(uconvert_toascii
(pattern, tmp), &ff_data->data);

(code deleted)

   if (ff_data->data.attrib & ~ff_data->attrib) {
      if (al_findnext(info) != 0) {
         al_findclose(info);
         return -1;
      }
      else
         return 0;
   }

This code returns -1 from the function if there are 
ANY file attributes set in the low byte. This includes 
the archive and read-only bits. Acccording to MSDN, 
the archive bit is set when a file is changed, and 
cleared by the backup command.

This assumes that the binary files match the source 
files, naturally. My discovry of this was while 
debugging a crashing MSVC6 project, and confirmed by 
copying the function and renaming it so I could debug 
it.

Submitted by:

Neil Gilmore
raito@xxxxxxxxxx

----------------------------------------------------------------------

>Comment By: Matthew Leverton (konforce)
Date: 2007-08-04 12:06

Message:
Logged In: YES 
user_id=611208
Originator: NO

Works as documented.

----------------------------------------------------------------------

Comment By: Evert Glebbeek (eglebbk)
Date: 2006-04-25 02:09

Message:
Logged In: YES 
user_id=807362

I'm confused.
Shouldn't you pass the attributes in the attrib parameter to
the function so that it returns only those files you want?
In other words, doesn't it depend on what parameter you pass
wether it finds files or not?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=1475932&group_id=5665




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