From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#18891: Doesn't handle pwd = /C: very well Date: Fri, 07 Nov 2014 17:58:30 +0100 Message-ID: <87sihvgd6x.fsf@gmx.de> References: <87d293dtc5.fsf@gmx.de> <83lhnqvqt9.fsf@gnu.org> <87y4rpvqgz.fsf@gmx.de> <871tpfhxl6.fsf@gmx.de> <83a943rqjf.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415379855 4780 80.91.229.3 (7 Nov 2014 17:04:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2014 17:04:15 +0000 (UTC) Cc: 18891@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 07 18:04:07 2014 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 1XmmxC-0004sv-8j for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Nov 2014 18:04:06 +0100 Original-Received: from localhost ([::1]:32990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmmxB-0006j9-S4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Nov 2014 12:04:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmmsO-0007Oj-QO for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:59:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmmsI-0007cB-TT for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:59:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmmsI-0007c3-Qr for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XmmsI-0001rw-Eo for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2014 11:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Nov 2014 16:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18891 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18891-submit@debbugs.gnu.org id=B18891.14153795197151 (code B ref 18891); Fri, 07 Nov 2014 16:59:02 +0000 Original-Received: (at 18891) by debbugs.gnu.org; 7 Nov 2014 16:58:39 +0000 Original-Received: from localhost ([127.0.0.1]:53082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xmmru-0001rH-Ol for submit@debbugs.gnu.org; Fri, 07 Nov 2014 11:58:39 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:53860) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xmmrr-0001r4-Jo for 18891@debbugs.gnu.org; Fri, 07 Nov 2014 11:58:36 -0500 Original-Received: from detlef.gmx.de ([87.146.56.248]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LfGo0-1YNzHd1oOe-00oqpt; Fri, 07 Nov 2014 17:58:33 +0100 In-Reply-To: <83a943rqjf.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 07 Nov 2014 17:14:44 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:mGul4q85vLMl5pCtr+zovgaBu9ydE/T5vvzw2BI7cbQPpWaQut8 Py06ScLdAneLwA3jRUzlqQDNCOXtejGrp99EAdllq58Wayx/RAtTm3e3RpC0nRQG/G7MPh8 puMhYJT/88wvO2ZJ2vVnHbzPf9UJjWVzb/aoid2t7otuQEwtFapJQbMv0iKMplvrd4aLTKx wIsfVvsQQTp9qMiXv5s6A== X-UI-Out-Filterresults: notjunk:1; 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: 140.186.70.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:95677 Eli Zaretskii writes: > Your change calls Ffile_accessible_directory_p, Fstring_match, and > Fsubstring with a unibyte (encoded) string as their argument. I think > we should avoid that, as, e.g., Fstring_match might yield a false > positive under some encodings. Shall I change it like this? --8<---------------cut here---------------start------------->8--- *** /usr/local/src/emacs-24/src/callproc.c.~117680~ 2014-11-07 17:54:37.318055813 +0100 --- /usr/local/src/emacs-24/src/callproc.c 2014-11-07 17:54:03.865559094 +0100 *************** *** 150,157 **** dir = expand_and_dir_to_file (dir, Qnil); - if (STRING_MULTIBYTE (dir)) - dir = ENCODE_FILE (dir); if (NILP (Ffile_accessible_directory_p (dir))) report_file_error ("Setting current directory", BVAR (current_buffer, directory)); --- 150,155 ---- *************** *** 160,165 **** --- 158,166 ---- if (Fstring_match (build_string ("^/:"), dir, Qnil)) dir = Fsubstring (dir, make_number (2), Qnil); + if (STRING_MULTIBYTE (dir)) + dir = ENCODE_FILE (dir); + RETURN_UNGCPRO (dir); } --8<---------------cut here---------------end--------------->8--- Best regards, Michael.