Closed rojkov closed 7 years ago
I think option 2 is indeed the best approach; please revise your patch and resubmit and I'll +1
populate_file_struct()
;Looks good to me. +1
For the record:
In master, this change was reverted due to test suite failures. It caused file types to be calculated for Manifest.full, but not for bundle manifests.
The performance improvements from the earlier discussion on this PR are still worth considering.
In the interim, @tmarcu pushed 74c8f86 to address the d_type portability issue.
@phmccarty with performance improvements you mean removing the extra populate_file_struct()? Should this be tracked in a new issue?
@pohly Exactly. I opened #39 for tracking.
According to POSIX.1 only d_name and d_ino fields of struct dirent are standardized. d_type isn't always correctly set on file systems like XFS. In such cases it makes sense to resort to lstat(). Otherwise a user has hard time figuring out what's wrong with her setup.
Signed-off-by: Dmitry Rozhkov dmitry.rozhkov@linux.intel.com