From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#28207: 26.0.50; MS Windows UNC file names complete as directory names Date: Fri, 25 Aug 2017 14:56:38 +0100 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1503669555 17088 195.159.176.226 (25 Aug 2017 13:59:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2017 13:59:15 +0000 (UTC) To: Eli Zaretskii , 28207@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 25 15:59:10 2017 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 1dlF8Z-0003qR-F6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Aug 2017 15:59:03 +0200 Original-Received: from localhost ([::1]:53478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlF8g-0003qK-Ev for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Aug 2017 09:59:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlF7g-0003P8-Bt for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2017 09:58:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlF7a-0001DY-QN for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2017 09:58:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45825) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dlF7a-0001DP-L7 for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2017 09:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dlF7a-0001oh-1m for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2017 09:58:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 13:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28207 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28207-submit@debbugs.gnu.org id=B28207.15036694356926 (code B ref 28207); Fri, 25 Aug 2017 13:58:02 +0000 Original-Received: (at 28207) by debbugs.gnu.org; 25 Aug 2017 13:57:15 +0000 Original-Received: from localhost ([127.0.0.1]:54506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlF6p-0001ne-HE for submit@debbugs.gnu.org; Fri, 25 Aug 2017 09:57:15 -0400 Original-Received: from mail-vk0-f52.google.com ([209.85.213.52]:37976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlF6o-0001nQ-H1 for 28207@debbugs.gnu.org; Fri, 25 Aug 2017 09:57:14 -0400 Original-Received: by mail-vk0-f52.google.com with SMTP id l132so7452356vke.5 for <28207@debbugs.gnu.org>; Fri, 25 Aug 2017 06:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=DcxdjodDKu55Ms2hBnW6nSJmOjQxRk4gujn22UEV3cA=; b=DXseKVbRUh5Kb0xEE9cmL6NxSOtHFOse47Ls9UJR4K0yNkOFKuX+sRGgZnRV5DIuJV q/Dbrg39BNbEjLd9M4mjuIb4YzweSfHtObFYeTrIh05776nXzk3V+X/F3X4Qc06x6kPl fKewP8zxVpBf1hzLNtLXL4cHUfzBH9Brgz5cR3yDmOlF64OpNp6gNHjhlTu+SzAHbDeR AcEjJcSL5UV6GTW0ssIaLRc8Mw4gQo3g0Oy58KwvgTILZkVtBUGP9juyangTpw01lTXr UazXnEdAzHaDqLk+vJb+NDt8XWN73WOv518dmOdkcb99ZXJM3YUZsSRoT+62BL/q0tqI z6RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DcxdjodDKu55Ms2hBnW6nSJmOjQxRk4gujn22UEV3cA=; b=TqmrFDPKHD0lza3VvQTrFscw8SxM3zXz4iBJb6zL8Xvj8lwukKl3EGGey/PjKpdJLT GR0QV3IhJLS+HpIRbdF3/CI2EGk2Tqur31fS8zB8SWQz/V84pekRO+U4BAkCqYBTmmJm C004hGb2Bjk81WefphInXQXhTWe2B2TCovcrDu5h/h2ZHEVyk6FrQ74uj2uBnb5ckqz3 Hqyc/t76hmj56vtknAdNm38lJ188m2eTGSiJzd57sVrEs5f1sDsOYCb74lYvYVUrzubd MrGUd0IUfMxcx5Z4Km/ERlD8dBIjINwYh93YLG+W1eXeRmynWcHDMSnAaShaj4oYzwW+ ItrQ== X-Gm-Message-State: AHYfb5iJhjSOpbtHtExlYYAAb+pgjVrPGiHRDuR2X9wJu2zPOUK8nDIx 6T8IpiVBSH6JHZ4oS60S+77Sp0JeOA== X-Received: by 10.31.4.144 with SMTP id 138mr6240093vke.76.1503669428405; Fri, 25 Aug 2017 06:57:08 -0700 (PDT) Original-Received: by 10.176.81.167 with HTTP; Fri, 25 Aug 2017 06:56:38 -0700 (PDT) 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:136197 Archived-At: On 23 August 2017 at 16:54, Richard Copley wrote: > C-x C-f //server/share/filename TAB > > Expected result: completes to "//server/share/filename". > Actual result: completes to "//server/share/filename/". You don't need a network share to recreate the symptom. "//localhost/c$/temp/x.txt" will do. For info, this symptom starts happening in this commit: commit fce2b2d2b40a1c0505d1ad623baef76f726c436a Author: Eli Zaretskii Date: Sat Aug 12 14:44:20 2017 +0300 Fix completion on directory names on MS-DOS/MS-Windows * src/msdos.c (faccessat): * src/w32.c (faccessat): Support relative file names, and add D_OK to 'mode' if the argument is a directory. This unbreaks file-name completion when the completion result is a directory. I looked at what the code was doing but I didn't get to the bottom of it. Perhaps because of if (is_unc_volume (filename)) [...] return NULL; in sys_opendir in w32.c? (So the global variable dir_pathname doesn't get set.) Or perhaps to do with file_name_completion in dired.c: case DT_LNK: case DT_UNKNOWN: directoryp = file_name_completion_dirp (fd, dp, len); (So directoryp is true if the file name in dp ends in a slash, but we later interpret directoryp to mean the file name is the name of an existing directory.) Or perhaps both, or neither.