[m-dev.] EISDIR and file opening

Paul Bone paul at bone.id.au
Wed Aug 31 13:52:53 AEST 2016


I noticed recently that, at least on my Linux system, opening with fopen() a
directory will succeed.  Errors will be returned when you attempt to read
from the returned file object.

Should the library code check that it has not just opened a directory within
the open code?  Rather than waiting for the caller to attempt to read from
the file?

Thanks.


-- 
Paul Bone
http://paul.bone.id.au


More information about the developers mailing list