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
The manual page dirent(5) says:
"BUGS
The usage of the member d_type of struct dirent is unportable as it is
FreeBSD-specific. It also may fail on certain file systems, for example
the cd9660 file system.
"
I think gitup would be more standards compliant if it used stat(2) for determining the type of a file/dir.
If d_type == DT_UNKNOWN (0) it could stat(2) the path and check st_mode. So the d_type is an optimized code path, but it fallbacks to an extra syscall on filesystems that need it.
Thank you for digging and finding the root of the problem. Nick sent me a patch to use stat(2) instead and I believe it's working properly now. Thanks!
The d_type value set by the readdir(directory) call in prune_tree() on FreeBSD 11-STABLE r369614 with a ZFS filesystem is always returning 0.
The text was updated successfully, but these errors were encountered: