bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash handling of ENOENT on missing files and directories


From: Greg Wooledge
Subject: Re: Bash handling of ENOENT on missing files and directories
Date: Tue, 5 Sep 2017 10:57:20 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Sep 05, 2017 at 12:18:40AM +0300, Jonny Grant wrote:
> > > $ cd missingdir
> > > bash: cd: missingdir: No such file or directory

> Yes, it's a known limitation of POSIX that it uses a shared error code for
> both files and directors, ENOENT. Which without programmers handling and
> checking the stat() flags, means the error isn't completely clear in the
> case where a file or dir does exist.

I find it completely clear.  I *prefer* seeing this error string over
some alternative spelling, because when I see this string, I know
*exactly* what it means.

When I see "No such file" or whatever, then I don't know exactly what
it means, other than someone is trying to dumb down the software to
"help" newbies in a way that is not actually helpful.

Keep following this slippery slope and you get Microsoft Windows error
messages that say nothing useful at all.  "An error has occurred."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]