FLTK logo

[fltk/fltk] scandir_posix.c readentry should check for ENOENT (#238)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] scandir_posix.c readentry should check for ENOENT (#238) Mark Olesen Jun 14, 2021  
 

 93     errno = 0;
 94     e = readdir(dirp);
 95     if (NULL == e)
 96     {
 97       if (!errno)
 98       {
 99         /* No more entries in directory */
100         *entryp = NULL;
101         *len = 0;
102         result = 0;
103       }

Change line 97 to

97 if ((!errno) && (ENOENT != errno))

This is according to POSIX. GCC and DJGPP apparently have different behavior,


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.