Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Stat of an empty resource does not generate proper Exception. #2048
The reason for this is we assume the FileResource generated will hit jnr-posix and when the stat fails it then asks jnr-posix for the errno(). EmptyFileResource will be generated in this case and it does not hit jnr-posix at all. One possible solution is to manually set errno from EmptyFileResource so that this pattern of depending on jnr-posix for error is valid?
Extra note that it is amazing this case works for me with enabled=true since it is still using EmptyFilerResource. The last errno set must just happen to be an enoent.