You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, according to the documentation, d_type is not guaranteed to be a member of the dirent struct on all systems, so this requires a macro guard using #ifdef _DIRENT_HAVE_D_TYPE to prevent compiler errors on such systems.
Second, d_typeis not guaranteed to be provided by all file systems. As such, a fallback to stat is required for cases when DT_UNKOWN is returned. Note that reading the dirent struct is more efficient, and should be tried first, but this fallback is needed as well.
The text was updated successfully, but these errors were encountered:
In this directory iteration loop in the FormulationManager, there are two potential issues.
First, according to the documentation,
d_type
is not guaranteed to be a member of thedirent
struct on all systems, so this requires a macro guard using#ifdef _DIRENT_HAVE_D_TYPE
to prevent compiler errors on such systems.Second,
d_type
is not guaranteed to be provided by all file systems. As such, a fallback tostat
is required for cases whenDT_UNKOWN
is returned. Note that reading thedirent
struct is more efficient, and should be tried first, but this fallback is needed as well.The text was updated successfully, but these errors were encountered: