[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 20:41
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Open
Resolution: None
Priority: 5
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

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

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/