[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] Checking permissions before opening file
From: |
Kamil Dudka |
Subject: |
Re: [Nano-devel] Checking permissions before opening file |
Date: |
Wed, 27 Jan 2016 18:22:55 +0100 |
User-agent: |
KMail/4.14.10 (Linux/4.3.3-301.fc23.x86_64; KDE/4.14.16; x86_64; ; ) |
On Wednesday 27 January 2016 17:52:24 Benno Schulenberg wrote:
> On Tue, Jan 26, 2016, at 21:48, Mike Frysinger wrote:
> > On 26 Jan 2016 21:03, Benno Schulenberg wrote:
> > > + if (errno == ENOENT)
> > > + statusbar(_("Path '%s' does not exist"), parentdir);
> > > + else
> > > + statusbar(_("Path '%s': %s"), parentdir, strerror(errno));
> >
> > why is this needed ? the strerror() for ENOENT is already:
> > No such file or directory
>
> I don't like the words "No such *file*..." It's not supposed to be
> a file, it /must/ be a directory. That's why I split out that one
> case, to give a clearer error message.
"No such file or directory" sounds clear to me. Moreover, the other error
message does not say whether the path is a directory or not. So it hardly
classifies as "a clearer error message" in my view.
Kamil