On 10/09/2017 05:30 AM, Jonny Grant wrote:
Fair enough. I agree it has been around for longer, but meant that POSIX standardized on that limitation, and didn't offer a better solution that clarified, eg ENOENTF ENOENTD

I'm guessing not making the distinction saved a bit of CPU.

yes, a clearer errno value, for files, and separate for directories would be ideal.

Would have been better.

Has anyone ever wanted to "cd" into a file?

$ cd file
-bash: cd: file: Not a directory

In this case it tested whether 'file' is a directory. When trying 'cd' into 'missingdir', the result is that an entry 'missingdir' couldn't be found, whether file or directory. This is actually more informative.

Peter

Reply via email to