From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <838u8r1oz3.fsf@gnu.org> References: <2974d023-5059-414f-960d-273fbeaca5de@default> <83fv37fdcg.fsf@gnu.org> <83egirfane.fsf@gnu.org> <83lhcy59xp.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1441033342 32742 80.91.229.3 (31 Aug 2015 15:02:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Aug 2015 15:02:22 +0000 (UTC) Cc: 21346-done@debbugs.gnu.org To: drew.adams@oracle.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 31 17:02:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZWQb6-00041U-8b for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Aug 2015 17:02:12 +0200 Original-Received: from localhost ([::1]:38136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWQb6-0004N5-FS for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Aug 2015 11:02:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWQb2-0004Lh-OU for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2015 11:02:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWQaw-0003pg-PV for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2015 11:02:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWQaw-0003pB-M0 for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2015 11:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZWQaw-0001aT-Eq for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2015 11:02:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Aug 2015 15:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 21346 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 21346@debbugs.gnu.org, eliz@gnu.org, drew.adams@oracle.com Original-Received: via spool by 21346-done@debbugs.gnu.org id=D21346.14410332916059 (code D ref 21346); Mon, 31 Aug 2015 15:02:01 +0000 Original-Received: (at 21346-done) by debbugs.gnu.org; 31 Aug 2015 15:01:31 +0000 Original-Received: from localhost ([127.0.0.1]:43775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWQaR-0001Zf-5w for submit@debbugs.gnu.org; Mon, 31 Aug 2015 11:01:31 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:56865) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWQaO-0001ZV-DM for 21346-done@debbugs.gnu.org; Mon, 31 Aug 2015 11:01:29 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NTY00H00BYGQS00@a-mtaout20.012.net.il> for 21346-done@debbugs.gnu.org; Mon, 31 Aug 2015 18:01:26 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NTY00HRTCEEHL90@a-mtaout20.012.net.il>; Mon, 31 Aug 2015 18:01:26 +0300 (IDT) In-reply-to: <83lhcy59xp.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106011 Archived-At: > Date: Wed, 26 Aug 2015 18:46:58 +0300 > From: Eli Zaretskii > 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.