From unknown Fri Aug 15 17:50:29 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4673 <4673@debbugs.gnu.org> To: bug#4673 <4673@debbugs.gnu.org> Subject: Status: 23.1; UNC paths of the form "//DFSROOT/SHARE" Reply-To: bug#4673 <4673@debbugs.gnu.org> Date: Sat, 16 Aug 2025 00:50:29 +0000 retitle 4673 23.1; UNC paths of the form "//DFSROOT/SHARE" reassign 4673 emacs submitter 4673 Richard Copley severity 4673 normal thanks From rcopley@gmail.com Thu Oct 8 06:43:31 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 8 Oct 2009 13:43:31 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n98DhTxZ021628 for ; Thu, 8 Oct 2009 06:43:30 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvtHF-0008UI-65 for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2009 09:43:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvtH9-0008SR-UG for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2009 09:43:28 -0400 Received: from [199.232.76.173] (port=43581 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvtH9-0008SI-Qo for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2009 09:43:23 -0400 Received: from mail-bw0-f220.google.com ([209.85.218.220]:50948) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvtH9-0006xJ-Et for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2009 09:43:23 -0400 Received: by bwz20 with SMTP id 20so5725655bwz.42 for ; Thu, 08 Oct 2009 06:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=XK+mTquktwqbWddRpUGA3eK1JqqXJCq5ybgyqPTiA2Y=; b=UgFRHh4IsPYy+piHH2U6OM3mgHwqT3nsnp/FNBLwLPd02mUGm1FILCiHJSag1Q7tfy o6Pud1LfoaA+IlVaQKwXZgLxCW+S5Qfv6xaNtJYK+54kBr4XNct6iVBVE2UMjapUvU0g RmNor3+F2ArOaRvBaZkJry0noU7Shh0oln5Z4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=qgjXLXPqG3KpfxeZ6ESnGHYH1rgOOXt7JQbb2YznTLYfYzx2q3+4g85DnSP31Hg3RO yZYZrEyIRTn1Uk82DgHqSUwnDP/3UVrnJ1GID56A2el9K1ji2vbhidGImbtdDBQ9eOGA O9h95YWxS/yi7MshuEqKDt72O63ywpf88MLjk= MIME-Version: 1.0 Received: by 10.103.84.1 with SMTP id m1mr538267mul.34.1255009401848; Thu, 08 Oct 2009 06:43:21 -0700 (PDT) Date: Thu, 8 Oct 2009 14:43:21 +0100 Message-ID: Subject: 23.1; UNC paths of the form "//DFSROOT/SHARE" From: Richard Copley To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) On Windows in a domain environment, suppose "//DFSROOT" is a domain-hosted DFS root, with a share "//DFSROOT/SHARE". (Typically, DFSROOT will be the name of the domain.) Interactively, using "C-x C-f / / D F S R O O T / S H A R E RET" causes an error: "completion--some: Opening directory: invalid argument, //DFSROOT/". This occurs in Emacs 23.1 but not in Emacs 22.3. I haven't looked into the completion code to see why. This is a bug. Note: The list returned by the form (directory-files-and-attributes "//DFSROOT/SHARE") contains the list ("..") as an element. Evaluating (directory-files-and-attributes "//DFSROOT") signals an error "Opening directory: invalid argument, //DFSROOT". This occurs on Emacs 22.3 as well as Emacs 23.1 and is probably the correct behaviour. Therefore, in Emacs 23.1 but not in Emacs 22.3, when visiting the directory "//DFSROOT/SHARE" by evaluating (find-file "//DFS-ROOT/SHARE"), the function `ls-lisp-insert-directory' fails, because it does not account for the possibility that an entry in the list returned by `directory-files-and-attributes' may be missing the attribute data. The error signalled is "Format specifier doesn't match argument type", arising from the form (format "%d" fuid) where fuid is nil. This is a bug. To reproduce, run Emacs 23.1 in a domain environment where domain-hosted DFS is in use, and visit a directory of the form "//DOMAIN/SHARE" or "//DFSROOT/SHARE" by evaluating the expression (find-file "//DFSROOT/SHARE"). Note that the more familiar UNC paths of the form "//SERVER/SHARE", where SERVER is the name of a computer, will not cause these errors. In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENG value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f / / u h b / w c l C-g M-: ( f i n d - f i l e SPC " / / u h b / w c l " ) q M-x r e p o r t SPC e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. completion--some: Opening directory: invalid argument, //uhb/ Quit Entering debugger... Back to top level. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 04 07:45:39 2010 Received: (at control) by debbugs.gnu.org; 4 Dec 2010 12:45:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POrUh-00085A-ME for submit@debbugs.gnu.org; Sat, 04 Dec 2010 07:45:39 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POrUe-00084x-Qn for control@debbugs.gnu.org; Sat, 04 Dec 2010 07:45:38 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LCW00H00M9G4700@a-mtaout23.012.net.il> for control@debbugs.gnu.org; Sat, 04 Dec 2010 14:50:19 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.69.203]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LCW00HK4MBU2R60@a-mtaout23.012.net.il> for control@debbugs.gnu.org; Sat, 04 Dec 2010 14:50:19 +0200 (IST) Date: Sat, 04 Dec 2010 14:50:24 +0200 From: Eli Zaretskii X-012-Sender: halo1@inter.net.il To: control@debbugs.gnu.org Message-id: <8339qd8zxr.fsf@gnu.org> X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.4 (/) merge 4674 4673 From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 04 07:49:53 2010 Received: (at 4673-done) by debbugs.gnu.org; 4 Dec 2010 12:49:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POrYn-0008B4-18 for submit@debbugs.gnu.org; Sat, 04 Dec 2010 07:49:53 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POrYk-0008Am-KO; Sat, 04 Dec 2010 07:49:51 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LCW00800MHPWX00@a-mtaout20.012.net.il>; Sat, 04 Dec 2010 14:55:24 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.69.203]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LCW008AEMKAHLB0@a-mtaout20.012.net.il>; Sat, 04 Dec 2010 14:55:24 +0200 (IST) Date: Sat, 04 Dec 2010 14:55:28 +0200 From: Eli Zaretskii Subject: Re: bug#4674: 23.1; UNC paths and file-relative-directory In-reply-to: X-012-Sender: halo1@inter.net.il To: Richard Copley , 4674-done@debbugs.gnu.org, 4673-done@debbugs.gnu.org Message-id: <831v5x8zpb.fsf@gnu.org> References: X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 4673-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Date: Thu, 8 Oct 2009 14:54:38 +0100 > From: Richard Copley > Cc: > > The function `file-relative-directory' has logic to detect when the > two given paths are part of two separate directory trees, and to > return the absolute file name in such cases. That logic does not catch > the case when the two given paths are UNC paths on different servers. > For example, on my present network (where there are computers named > IOBATES and KERES), the form (file-relative-name "//iobates/e/temp" > "//keres/e/temp") returns "../../../iobates/e/temp", which is not a > valid relative path to "//iobates/e/temp" from "//keres/e/temp". This > is therefore a bug. Thanks, I fixed this now on the Emacs-23 branch. From unknown Fri Aug 15 17:50:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 02 Jan 2011 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 31 06:17:49 2012 Received: (at control) by debbugs.gnu.org; 31 Jan 2012 11:17:49 +0000 Received: from localhost ([127.0.0.1]:46365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsBia-0003R7-Al for submit@debbugs.gnu.org; Tue, 31 Jan 2012 06:17:48 -0500 Received: from mail-we0-f172.google.com ([74.125.82.172]:46555) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsBiY-0003Qs-PG for control@debbugs.gnu.org; Tue, 31 Jan 2012 06:17:43 -0500 Received: by werm10 with SMTP id m10so3975123wer.3 for ; Tue, 31 Jan 2012 03:17:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=ZrRSUj4fRQwHSr4lbdukjgsGds/vB018ohLom+05/vs=; b=PIIRpP5ABNeToaRiBjJtNme8eD5eJSOJNl4QldTvZ98LNyyc6nZTZbcRidhXHdrbTC +W9dMpOM6RyirmxuKpkWAMYhvk+nlfl72wMfjbVILcFk+XJfWRlJuXiiHEWfunrLDtYF rBeezJe+hEh/34DnVSSvI5MgD/CzAqjRFi1B0= MIME-Version: 1.0 Received: by 10.216.132.4 with SMTP id n4mr765554wei.19.1328008641984; Tue, 31 Jan 2012 03:17:21 -0800 (PST) Received: by 10.223.88.156 with HTTP; Tue, 31 Jan 2012 03:17:21 -0800 (PST) Date: Tue, 31 Jan 2012 11:17:21 +0000 Message-ID: Subject: unarchive 4673 From: Richard Copley To: control@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) unarchive 4673 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 31 06:51:52 2012 Received: (at 4673) by debbugs.gnu.org; 31 Jan 2012 11:51:52 +0000 Received: from localhost ([127.0.0.1]:46414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsCFb-00054r-6f for submit@debbugs.gnu.org; Tue, 31 Jan 2012 06:51:52 -0500 Received: from mail-ww0-f42.google.com ([74.125.82.42]:49383) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsCFY-00054W-QX for 4673@debbugs.gnu.org; Tue, 31 Jan 2012 06:51:49 -0500 Received: by wgbgn7 with SMTP id gn7so4615349wgb.3 for <4673@debbugs.gnu.org>; Tue, 31 Jan 2012 03:51:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=Zu5WnqU75TY2iQ3G8hkpJREtZw5Zto0Rv/xIEGnzLmk=; b=Brm0uwk81VRtQxNqV90X+6iThcRBJ8J3qzkT93rnyfG8/UhrTpWcvadOblbjlOUKb+ nmWra9T0oIxf52JVY39VB4EbeYeJvgNGXU5ZKxuw+/knXE5Fh/oxZ9/Rm0gLWRsvYP5Q 0PIoDwk5sF316S86cXwECgqVxJvvYXL481A44= MIME-Version: 1.0 Received: by 10.180.101.101 with SMTP id ff5mr3179951wib.14.1328010687620; Tue, 31 Jan 2012 03:51:27 -0800 (PST) Received: by 10.223.88.156 with HTTP; Tue, 31 Jan 2012 03:51:27 -0800 (PST) Date: Tue, 31 Jan 2012 11:51:27 +0000 Message-ID: Subject: Not the same as 4674 From: Richard Copley To: 4673@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 4673 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) This is a separate bug from 4673 (which I believe is fixed). Can they be un-merged? Visiting a Windows DFS share when ".." is not accessible still crashes in `ls-lisp-insert-directory' in the trunk of Emacs, as the attribute list for ".." in the `file-alist' returned for by `directory-files-and-attributes' is empty. Namely, (directory-files-and-attributes "//root/share" nil nil t 'string) returns something like this: '(("." t 1 "RCO" "Domain Users" (20263 19364) (20263 19364) (18713 25576) 0 "drwxrwxrwx" nil 0 (18463 . 35684)) ("..") ("file 1.csv" nil 1 "RCO" "Domain Users" (18744 6249) (18713 32060) (18713 25866) 13008 "-rw-rw-rw-" nil 0 (18463 . 35684)) ("file 2.csv" nil 1 "RCO" "Domain Users" (20043 4789) (20043 4789) (20043 4789) 19134 "-rw-rw-rw-" nil 0 (18463 . 35684)) ("file 3.csv" nil 1 "RCO" "Domain Users" (18788 55198) (20263 52634) (18788 55198) 29596 "-rw-rw-rw-" nil 0 (18463 . 35684)))) Meanwhile, back in `ls-lisp-insert-directory', (format "%d" fuid) fails with (error "Format specifier doesn't match argument type"). From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 31 15:16:14 2012 Received: (at control) by debbugs.gnu.org; 31 Jan 2012 20:16:14 +0000 Received: from localhost ([127.0.0.1]:47639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsK7i-0003GE-3P for submit@debbugs.gnu.org; Tue, 31 Jan 2012 15:16:14 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:34028) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsK7f-0003Fx-Oa for control@debbugs.gnu.org; Tue, 31 Jan 2012 15:16:12 -0500 Received: by wibhm9 with SMTP id hm9so329320wib.3 for ; Tue, 31 Jan 2012 12:15:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=/aslxR+SZSvhXowUfCJbVwZz/fNtjFaAQAKVDZ1l0qQ=; b=gcHqFhlgxXNlUycNip+A889eFMbEkookRDVm4T/i1uEytfL+P2VhMcuICQ5r+xlzTM RAZc4k5CpM7MrJBsoVzjp71zQq/GdZfa6kOonLpKJabK2LlbW1WWosMlTOYhUaxqYYgc yWP6+KPo7DqS2f6trnP+QXAxFf0wHc7BQqqBs= MIME-Version: 1.0 Received: by 10.180.101.101 with SMTP id ff5mr6277388wib.14.1328040948940; Tue, 31 Jan 2012 12:15:48 -0800 (PST) Received: by 10.223.88.156 with HTTP; Tue, 31 Jan 2012 12:15:48 -0800 (PST) Date: Tue, 31 Jan 2012 20:15:48 +0000 Message-ID: Subject: unmerge 4673 From: Richard Copley To: control@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) unmerge 4673 From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 06:19:17 2012 Received: (at 4673) by debbugs.gnu.org; 3 Feb 2012 11:19:17 +0000 Received: from localhost ([127.0.0.1]:51728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtHAi-00051F-Qt for submit@debbugs.gnu.org; Fri, 03 Feb 2012 06:19:17 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:57816) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtHAg-000511-LO for 4673@debbugs.gnu.org; Fri, 03 Feb 2012 06:19:15 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LYT00300DZHCK00@a-mtaout20.012.net.il> for 4673@debbugs.gnu.org; Fri, 03 Feb 2012 13:18:13 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.37.111]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYT0023LE2COS80@a-mtaout20.012.net.il>; Fri, 03 Feb 2012 13:18:13 +0200 (IST) Date: Fri, 03 Feb 2012 13:18:12 +0200 From: Eli Zaretskii Subject: Re: bug#4673: Not the same as 4674 In-reply-to: X-012-Sender: halo1@inter.net.il To: Richard Copley Message-id: <83vcnodv2j.fsf@gnu.org> References: X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 4673 Cc: 4673@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Tue, 31 Jan 2012 11:51:27 +0000 > From: Richard Copley > > This is a separate bug from 4673 (which I believe is fixed). Can they > be un-merged? Done. > Visiting a Windows DFS share when ".." is not accessible still crashes > in `ls-lisp-insert-directory' in the trunk of Emacs, as the attribute > list for ".." in the `file-alist' returned for by > `directory-files-and-attributes' is empty. What does the following yield for a DFS share? M-: (file-attributes "//root/share/.." 'string) RET For that matter, what does the following cmd command display? dir /n/q/a:d \\root\share > Meanwhile, back in `ls-lisp-insert-directory', (format "%d" fuid) > fails with (error "Format specifier doesn't match argument type"). I will work on making ls-lisp-insert-directory be more tolerant of such use cases, but it is important for me to understand whether or not there is really a ".." entry on such shares, as this will determine if we want to display them in some way or simply omit them from the directory listing in Dired. The above questions will help me make up my mind about that. TIA From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 07:18:14 2012 Received: (at 4673) by debbugs.gnu.org; 3 Feb 2012 12:18:14 +0000 Received: from localhost ([127.0.0.1]:51745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtI5m-0007CH-1B for submit@debbugs.gnu.org; Fri, 03 Feb 2012 07:18:14 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:42026) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtI5i-0007Bx-0c for 4673@debbugs.gnu.org; Fri, 03 Feb 2012 07:18:11 -0500 Received: by wibhm9 with SMTP id hm9so2633160wib.3 for <4673@debbugs.gnu.org>; Fri, 03 Feb 2012 04:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=NmjLZvECK4aGUxNnbCBdvb88CifHECFS64IgW63oFbY=; b=nsRaqsiFnDGvpYOKCr5GX/4QOYtIZsiv6vMKEonAWUw5q5xBoUpG3z9aICYysX3dLQ nkihUfht9fyAMHIYufbD7eXrqgY3TFaqxyp0ZdMi1WjyelobOfCxYh3dLk0sYIjKi5Tc h1tZIgg5YuCin3kHTdP1XdenBhbOQeEi9JZL8= MIME-Version: 1.0 Received: by 10.180.101.101 with SMTP id ff5mr24499065wib.14.1328271451903; Fri, 03 Feb 2012 04:17:31 -0800 (PST) Received: by 10.223.88.156 with HTTP; Fri, 3 Feb 2012 04:17:31 -0800 (PST) In-Reply-To: <83vcnodv2j.fsf@gnu.org> References: <83vcnodv2j.fsf@gnu.org> Date: Fri, 3 Feb 2012 12:17:31 +0000 Message-ID: Subject: Re: bug#4673: Not the same as 4674 From: Richard Copley To: Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 4673 Cc: 4673@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 3 February 2012 11:18, Eli Zaretskii wrote: >> Date: Tue, 31 Jan 2012 11:51:27 +0000 >> From: Richard Copley >> >> This is a separate bug from 4673 (which I believe is fixed). Can they >> be un-merged? > > Done. > >> Visiting a Windows DFS share when ".." is not accessible still crashes >> in `ls-lisp-insert-directory' in the trunk of Emacs, as the attribute >> list for ".." in the `file-alist' returned for by >> `directory-files-and-attributes' is empty. > > What does the following yield for a DFS share? > > =A0M-: (file-attributes "//root/share/.." 'string) RET nil. > For that matter, what does the following cmd command display? > > =A0dir /n/q/a:d \\root\share Volume in drive \\root\share is Data Volume Serial Number is 0123-4567 Directory of \\root\share 11/11/2011 12:34 BUILTIN\Administrators . 11/11/2011 12:34 BUILTIN\Administrators .. 0 File(s) 0 bytes 2 Dir(s) 123,456,789,000 bytes free >> Meanwhile, back in `ls-lisp-insert-directory', (format "%d" fuid) >> fails with (error "Format specifier doesn't match argument type"). > > I will work on making ls-lisp-insert-directory be more tolerant of > such use cases, but it is important for me to understand whether or > not there is really a ".." entry on such shares, as this will > determine if we want to display them in some way or simply omit them > from the directory listing in Dired. =A0The above questions will help me > make up my mind about that. In cmd if the current directory is \\root\share then (just the same as for c:\) "cd .." does not change directory and "dir /a:d ." and "dir /a:d .." display the same thing. > TIA Thanks yourself. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 04:06:37 2012 Received: (at 4673) by debbugs.gnu.org; 4 Feb 2012 09:06:37 +0000 Received: from localhost ([127.0.0.1]:53090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtbZt-0008Mi-AJ for submit@debbugs.gnu.org; Sat, 04 Feb 2012 04:06:37 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:49792) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtbZq-0008MT-Um for 4673@debbugs.gnu.org; Sat, 04 Feb 2012 04:06:36 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LYV008002KRCU00@a-mtaout22.012.net.il> for 4673@debbugs.gnu.org; Sat, 04 Feb 2012 11:05:51 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.149.90]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYV008AU2LQAK30@a-mtaout22.012.net.il>; Sat, 04 Feb 2012 11:05:51 +0200 (IST) Date: Sat, 04 Feb 2012 11:05:50 +0200 From: Eli Zaretskii Subject: Re: bug#4673: Not the same as 4674 In-reply-to: To: Richard Copley Message-id: <83aa4zdl3l.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <83vcnodv2j.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 4673 Cc: 4673@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Fri, 3 Feb 2012 12:17:31 +0000 > From: Richard Copley > Cc: 4673@debbugs.gnu.org >=20 > >> Visiting a Windows DFS share when ".." is not accessible still c= rashes > >> in `ls-lisp-insert-directory' in the trunk of Emacs, as the attr= ibute > >> list for ".." in the `file-alist' returned for by > >> `directory-files-and-attributes' is empty. > > > > What does the following yield for a DFS share? > > > > =A0M-: (file-attributes "//root/share/.." 'string) RET >=20 > nil. >=20 > > For that matter, what does the following cmd command display? > > > > =A0dir /n/q/a:d \\root\share >=20 >=20 > Volume in drive \\root\share is Data > Volume Serial Number is 0123-4567 >=20 > Directory of \\root\share >=20 > 11/11/2011 12:34 BUILTIN\Administrators . > 11/11/2011 12:34 BUILTIN\Administrators .. > 0 File(s) 0 bytes > 2 Dir(s) 123,456,789,000 bytes free Can you test the patch below? I don't have access to such shares, so I cannot test it myself. TIA. Since ls-lisp.el is preloaded, you will either need to rebuild Emacs (if you have the development environment and the Emacs sources), or manually load the patched ls-lisp.el before invoking Dired. =3D=3D=3D modified file 'lisp/ChangeLog' --- lisp/ChangeLog=092012-02-04 02:10:22 +0000 +++ lisp/ChangeLog=092012-02-04 09:00:52 +0000 @@ -1,3 +1,9 @@ +2012-02-04 Eli Zaretskii + +=09* ls-lisp.el (ls-lisp-sanitize): New function. +=09(ls-lisp-insert-directory): Use it to fix or remove any elements +=09in file-alist with missing attributes. (Bug#4673) + 2012-02-04 Glenn Morris =20 =09* image.el (image-extension-data): Add obsolete alias. =3D=3D=3D modified file 'lisp/ls-lisp.el' --- lisp/ls-lisp.el=092012-01-19 07:21:25 +0000 +++ lisp/ls-lisp.el=092012-02-04 08:55:21 +0000 @@ -331,6 +331,7 @@ not contain `d', so that a full listing=20 =09 ;; do all bindings here for speed =09 total-line files elt short file-size attr =09 fuid fgid uid-len gid-len) +=09(setq file-alist (ls-lisp-sanitize file-alist)) =09(cond ((memq ?A switches) =09 (setq file-alist =09=09 (ls-lisp-delete-matching "^\\.\\.?$" file-alist))) @@ -437,6 +438,22 @@ not contain `d', so that a full listing=20 =09(message "%s: doesn't exist or is inaccessible" file) =09(ding) (sit-for 2)))))=09=09; to show user the message! =20 +(defun ls-lisp-sanitize (file-alist) + "Sanitize the elements in FILE-ALIST. +Fixes any elements in the alist for directory entries whose file +attributes are nil (meaning that `file-attributes' failed for +them). This is known to happen for some network shares, in +particular for the \"..\" directory entry. + +If the \"..\" directory entry has nil attributes, the attributes +are copied from the \".\" entry, if they are non-nil. Otherwise, +the offending element is removed from the list, as are any +elements for other directory entries with nil attributes." + (if (and (null (cdr (assoc ".." file-alist))) +=09 (cdr (assoc "." file-alist))) + (setcdr (assoc ".." file-alist) (cdr (assoc "." file-alist)))) + (rassq-delete-all nil file-alist)) + (defun ls-lisp-column-format (file-alist) "Insert the file names (only) in FILE-ALIST into the current buffe= r. Format in columns, sorted vertically, following GNU ls -C. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 07 10:31:23 2012 Received: (at 4673) by debbugs.gnu.org; 7 Feb 2012 15:31:23 +0000 Received: from localhost ([127.0.0.1]:59127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Run0s-00067v-0x for submit@debbugs.gnu.org; Tue, 07 Feb 2012 10:31:22 -0500 Received: from mail-ww0-f46.google.com ([74.125.82.46]:54205) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Run0k-00067e-J9 for 4673@debbugs.gnu.org; Tue, 07 Feb 2012 10:31:19 -0500 Received: by wgbdt14 with SMTP id dt14so7032803wgb.15 for <4673@debbugs.gnu.org>; Tue, 07 Feb 2012 07:30:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=3V9tONJBpO2RRUtSnWPpS6WreUD07Gca9G2i0CKzJao=; b=kDqDKI7P5HS8uWt0Faxdoy14BNspebJWfxALShSSGhJfr6vTT4nkljbRaPAODGZ2pG vHyrhpL7ip5uEnO0QbK8bfQtBMd+Quxw53Q2DjRrx18ZF0ye2L1jxfjtm3Zv2mG6GcP5 qfCCI6a1Zks4ew5hIaigAd8fFvpDto1gxkpQA= MIME-Version: 1.0 Received: by 10.180.101.101 with SMTP id ff5mr20456669wib.14.1328628612679; Tue, 07 Feb 2012 07:30:12 -0800 (PST) Received: by 10.223.88.156 with HTTP; Tue, 7 Feb 2012 07:30:12 -0800 (PST) In-Reply-To: <83aa4zdl3l.fsf@gnu.org> References: <83vcnodv2j.fsf@gnu.org> <83aa4zdl3l.fsf@gnu.org> Date: Tue, 7 Feb 2012 15:30:12 +0000 Message-ID: Subject: Re: bug#4673: Not the same as 4674 From: Richard Copley To: Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 4673 Cc: 4673@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 4 February 2012 09:05, Eli Zaretskii wrote: >> Date: Fri, 3 Feb 2012 12:17:31 +0000 >> From: Richard Copley >> Cc: 4673@debbugs.gnu.org >> >> >> Visiting a Windows DFS share when ".." is not accessible still crashe= s >> >> in `ls-lisp-insert-directory' in the trunk of Emacs, as the attribute >> >> list for ".." in the `file-alist' returned for by >> >> `directory-files-and-attributes' is empty. ... > Can you test the patch below? =A0I don't have access to such shares, so > I cannot test it myself. =A0TIA. > > Since ls-lisp.el is preloaded, you will either need to rebuild Emacs > (if you have the development environment and the Emacs sources), or > manually load the patched ls-lisp.el before invoking Dired. > > =3D=3D=3D modified file 'lisp/ChangeLog' > --- lisp/ChangeLog =A0 =A0 =A02012-02-04 02:10:22 +0000 > +++ lisp/ChangeLog =A0 =A0 =A02012-02-04 09:00:52 +0000 > @@ -1,3 +1,9 @@ > +2012-02-04 =A0Eli Zaretskii =A0 > + > + =A0 =A0 =A0 * ls-lisp.el (ls-lisp-sanitize): New function. > + =A0 =A0 =A0 (ls-lisp-insert-directory): Use it to fix or remove any ele= ments > + =A0 =A0 =A0 in file-alist with missing attributes. =A0(Bug#4673) > + > =A02012-02-04 =A0Glenn Morris =A0 > > =A0 =A0 =A0 =A0* image.el (image-extension-data): Add obsolete alias. > > =3D=3D=3D modified file 'lisp/ls-lisp.el' > --- lisp/ls-lisp.el =A0 =A0 2012-01-19 07:21:25 +0000 > +++ lisp/ls-lisp.el =A0 =A0 2012-02-04 08:55:21 +0000 > @@ -331,6 +331,7 @@ not contain `d', so that a full listing > =A0 =A0 =A0 =A0 =A0 =A0 ;; do all bindings here for speed > =A0 =A0 =A0 =A0 =A0 =A0 total-line files elt short file-size attr > =A0 =A0 =A0 =A0 =A0 =A0 fuid fgid uid-len gid-len) > + =A0 =A0 =A0 (setq file-alist (ls-lisp-sanitize file-alist)) > =A0 =A0 =A0 =A0(cond ((memq ?A switches) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq file-alist > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (ls-lisp-delete-matching "^\\.\\.= ?$" file-alist))) > @@ -437,6 +438,22 @@ not contain `d', so that a full listing > =A0 =A0 =A0 =A0(message "%s: doesn't exist or is inaccessible" file) > =A0 =A0 =A0 =A0(ding) (sit-for 2))))) =A0 =A0 =A0 =A0 =A0; to show user t= he message! > > +(defun ls-lisp-sanitize (file-alist) > + =A0"Sanitize the elements in FILE-ALIST. > +Fixes any elements in the alist for directory entries whose file > +attributes are nil (meaning that `file-attributes' failed for > +them). =A0This is known to happen for some network shares, in > +particular for the \"..\" directory entry. > + > +If the \"..\" directory entry has nil attributes, the attributes > +are copied from the \".\" entry, if they are non-nil. =A0Otherwise, > +the offending element is removed from the list, as are any > +elements for other directory entries with nil attributes." > + =A0(if (and (null (cdr (assoc ".." file-alist))) > + =A0 =A0 =A0 =A0 =A0(cdr (assoc "." file-alist))) > + =A0 =A0 =A0(setcdr (assoc ".." file-alist) (cdr (assoc "." file-alist))= )) > + =A0(rassq-delete-all nil file-alist)) > + > =A0(defun ls-lisp-column-format (file-alist) > =A0 "Insert the file names (only) in FILE-ALIST into the current buffer. > =A0Format in columns, sorted vertically, following GNU ls -C. > I rebuilt from the patched sources, and (dired "//root/share") works fine here now. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 07 12:32:09 2012 Received: (at 4673) by debbugs.gnu.org; 7 Feb 2012 17:32:09 +0000 Received: from localhost ([127.0.0.1]:59224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ruotk-0000Xb-TB for submit@debbugs.gnu.org; Tue, 07 Feb 2012 12:32:09 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]:44944) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ruoti-0000X8-Ms for 4673@debbugs.gnu.org; Tue, 07 Feb 2012 12:32:07 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LZ1000009UAE200@a-mtaout23.012.net.il> for 4673@debbugs.gnu.org; Tue, 07 Feb 2012 19:30:48 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.162.243]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LZ1000TG9ZBAJ70@a-mtaout23.012.net.il>; Tue, 07 Feb 2012 19:30:48 +0200 (IST) Date: Tue, 07 Feb 2012 19:30:51 +0200 From: Eli Zaretskii Subject: Re: bug#4673: Not the same as 4674 In-reply-to: X-012-Sender: halo1@inter.net.il To: Richard Copley Message-id: <83d39qblf8.fsf@gnu.org> References: <83vcnodv2j.fsf@gnu.org> <83aa4zdl3l.fsf@gnu.org> X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 4673 Cc: 4673@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.5 (/) > Date: Tue, 7 Feb 2012 15:30:12 +0000 > From: Richard Copley > Cc: 4673@debbugs.gnu.org > > I rebuilt from the patched sources, and (dired "//root/share") works > fine here now. Thanks for testing, I will install the change soon. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 07 12:48:53 2012 Received: (at 4673-done) by debbugs.gnu.org; 7 Feb 2012 17:48:53 +0000 Received: from localhost ([127.0.0.1]:59234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rup9u-0000wt-IC for submit@debbugs.gnu.org; Tue, 07 Feb 2012 12:48:52 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]:47651) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rup9r-0000we-DT for 4673-done@debbugs.gnu.org; Tue, 07 Feb 2012 12:48:48 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LZ100000AM5FW00@a-mtaout23.012.net.il> for 4673-done@debbugs.gnu.org; Tue, 07 Feb 2012 19:47:16 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.162.243]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LZ100048AQR83C0@a-mtaout23.012.net.il>; Tue, 07 Feb 2012 19:47:16 +0200 (IST) Date: Tue, 07 Feb 2012 19:47:19 +0200 From: Eli Zaretskii Subject: Re: bug#4673: Not the same as 4674 In-reply-to: <83d39qblf8.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: rcopley@gmail.com Message-id: <83aa4ubkns.fsf@gnu.org> References: <83vcnodv2j.fsf@gnu.org> <83aa4zdl3l.fsf@gnu.org> <83d39qblf8.fsf@gnu.org> X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 4673-done Cc: 4673-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.5 (/) > Date: Tue, 07 Feb 2012 19:30:51 +0200 > From: Eli Zaretskii > Cc: 4673@debbugs.gnu.org > > > Date: Tue, 7 Feb 2012 15:30:12 +0000 > > From: Richard Copley > > Cc: 4673@debbugs.gnu.org > > > > I rebuilt from the patched sources, and (dired "//root/share") works > > fine here now. > > Thanks for testing, I will install the change soon. Done (revision 107167 on the trunk). From unknown Fri Aug 15 17:50:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 07 Mar 2012 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator