[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR t
From: |
Eli Zaretskii |
Subject: |
bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p' |
Date: |
Mon, 31 Aug 2015 18:01:36 +0300 |
> Date: Wed, 26 Aug 2015 18:46:58 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 21346@debbugs.gnu.org
>
> > > > That predicate would seem to be unusable as a general test for
> > > > access to a directory. IOW, what it claims it does is hardly
> > > > what it does, apparently.
> > >
> > > It's not unusable. It checks the read-only bit (and the executable
> > > bit for files).
> >
> > Unusable "as a general test for access".
>
> I disagree. It does test that the file exists and is a directory, so
> it _will_ tell you when either of these 2 conditions is false. It
> just can yield a false positive regarding the success of opening and
> reading the directory. The alternative is to complicate the heck out
> of the implementation, make it much slower, and get false negatives
> instead. I think the alternative is worse.
On further thought, I found a simple and surprisingly efficient method
of testing directory accessibility without any false positives, and
made the corresponding changes.
> > > > And given this "inconsistency", don't you think this gotcha should
> > > > be mentioned in the doc - of `file-accessible-directory-p', for
> > > > example?
> > >
> > > Maybe. I'll have to think of a useful way of describing this.
> >
> > Perhaps what you said above, if nothing more informative can be found:
> >
> > On Windows, that test is not reliable enough.
>
> Done.
I've now removed that caveat from the doc string.
- bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p', Drew Adams, 2015/08/25
- bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p', Eli Zaretskii, 2015/08/25
- bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p', Drew Adams, 2015/08/25
- bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p', Eli Zaretskii, 2015/08/25
- bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p', Drew Adams, 2015/08/25
- bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p', Eli Zaretskii, 2015/08/26
- bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p', Drew Adams, 2015/08/26
- bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p',
Eli Zaretskii <=
- bug#21346: 25.0.50; REGRESSION: `directory-files' raises error for DIR that is `file-accessible-directory-p', Drew Adams, 2015/08/31