From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#30350: 27.0.50; Newest master can't run processes on macOS Date: Mon, 5 Feb 2018 11:13:16 -0800 Organization: UCLA Computer Science Department Message-ID: <616d413a-893c-a058-9620-0ac852fc8490@cs.ucla.edu> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------FD11BFEE09E601504F3591E4" X-Trace: blaine.gmane.org 1517857995 27485 195.159.176.226 (5 Feb 2018 19:13:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Feb 2018 19:13:15 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 Cc: 30350@debbugs.gnu.org, Sam Steingold , Alan Third To: Philipp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 05 20:13:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eimCC-0005m0-4u for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Feb 2018 20:12:52 +0100 Original-Received: from localhost ([::1]:53302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eimED-0006N3-Gb for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Feb 2018 14:14:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eimDK-0005r6-Vi for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 14:14:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eimDK-0000Wu-1X for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 14:14:02 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51102) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eimDJ-0000WL-U0 for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 14:14:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eimDJ-0001DW-KJ for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 14:14:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Feb 2018 19:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30350 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30350-submit@debbugs.gnu.org id=B30350.15178580054624 (code B ref 30350); Mon, 05 Feb 2018 19:14:01 +0000 Original-Received: (at 30350) by debbugs.gnu.org; 5 Feb 2018 19:13:25 +0000 Original-Received: from localhost ([127.0.0.1]:58998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eimCi-0001CW-Qa for submit@debbugs.gnu.org; Mon, 05 Feb 2018 14:13:24 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eimCh-0001CJ-Nc for 30350@debbugs.gnu.org; Mon, 05 Feb 2018 14:13:24 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DDB621616C5; Mon, 5 Feb 2018 11:13:17 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 7y1Bgf2Cv5Rk; Mon, 5 Feb 2018 11:13:17 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 290C51616D5; Mon, 5 Feb 2018 11:13:17 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Qw5TP5w8BCwC; Mon, 5 Feb 2018 11:13:17 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0457D1616C5; Mon, 5 Feb 2018 11:13:17 -0800 (PST) Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:142944 Archived-At: This is a multi-part message in MIME format. --------------FD11BFEE09E601504F3591E4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Does the attached patch work around the macOS bug? (I don't use macOS so can't easily test this.) The idea of this patch is to fix both the new bug with file-directory-p and the circa-2012 bug with file-accessible-directory-p. The bug should probably be fixed in Gnulib so that Emacs proper is unaffected, but first I want to check whether this fix approach works. --------------FD11BFEE09E601504F3591E4 Content-Type: text/x-patch; name="fileio.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fileio.diff" diff --git a/src/fileio.c b/src/fileio.c index be29e60fc0..b0ef3d4e91 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2811,12 +2811,15 @@ file_accessible_directory_p (Lisp_Object file) dir = data; else { - /* Just check for trailing '/' when deciding whether to append '/'. - That's simpler than testing the two special cases "/" and "//", - and it's a safe optimization here. */ - char *buf = SAFE_ALLOCA (len + 3); + /* Just check for trailing '/' when deciding whether append '/' + before appending '.'. That's simpler than testing the two + special cases "/" and "//", and it's a safe optimization + here. After appending '.', append another '/' to work around + a macOS bug (Bug#30350). */ + static char const appended[] = "/./"; + char *buf = SAFE_ALLOCA (len + sizeof appended); memcpy (buf, data, len); - strcpy (buf + len, &"/."[data[len - 1] == '/']); + strcpy (buf + len, &appended[data[len - 1] == '/']); dir = buf; } --------------FD11BFEE09E601504F3591E4--