From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: Bug Emacs 21.3: write-file downcasing Date: Fri, 07 Feb 2003 19:16:58 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <2110-Fri07Feb2003191658+0200-eliz@is.elta.co.il> References: <20030207084040.376A.LEKTU@terra.es> <6137-Fri07Feb2003172311+0200-eliz@is.elta.co.il> <20030207163850.3779.LEKTU@terra.es> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1044638580 5830 80.91.224.249 (7 Feb 2003 17:23:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 7 Feb 2003 17:23:00 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18hCDF-0001VA-00 for ; Fri, 07 Feb 2003 18:22:53 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18hCMt-0006lW-00 for ; Fri, 07 Feb 2003 18:32:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18hCAp-0000Ui-07 for emacs-devel@quimby.gnus.org; Fri, 07 Feb 2003 12:20:23 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18hCAS-0000Qk-00 for emacs-devel@gnu.org; Fri, 07 Feb 2003 12:20:00 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18hCAR-0000QB-00 for emacs-devel@gnu.org; Fri, 07 Feb 2003 12:19:59 -0500 Original-Received: from aragorn.inter.net.il ([192.114.186.23]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18hCAO-0000OF-00; Fri, 07 Feb 2003 12:19:57 -0500 Original-Received: from zaretsky (adsl-ayalon-pc-129-189.inter.net.il [213.8.129.189]) by aragorn.inter.net.il (Mirapoint Messaging Server MOS 3.2.2-GA) with ESMTP id AEY85581; Fri, 7 Feb 2003 19:19:47 +0200 (IST) Original-To: lektu@terra.es X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: <20030207163850.3779.LEKTU@terra.es> (message from Juanma Barranquero on Fri, 07 Feb 2003 16:50:11 +0100) Original-cc: seagull@fastmail.fm Original-cc: emacs-pretest-bug@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11477 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11477 > Date: Fri, 07 Feb 2003 16:50:11 +0100 > From: Juanma Barranquero > > > > > 2001-11-08 Andrew.Maguire@Smallworld.co.uk (Andrew Maguire) gnu.emacs.bug > > > (file-truename "C:/temp/a_file") > > > returns "C:/temp/a_file" if the file does not exist and > > > "c:/temp/a_file" if it does. > > > > I'm not convinced this is a bug :) > > > > If the file does not exist, the argument is returned unmodified. > > > > OTOH, if the file does exist, eventually normalize_filename (in w32.c) > > gets called, which returns the path and name exactly as it exists in > > the filesystem, but purposefully downcases the drive letter, according > > to this changelog entry: > > > > > 1996-07-03 Andrew Innes > > > > > > * nt.c (normalize_filename): Always lower-case drive letters, even > > > on systems that preserve case in filenames. > > > > and this source code comment: > > > > > /* Always lower-case drive letters a-z, even if the filesystem > > > preserves case in filenames. > > > This is so filenames can be compared by string comparison > > > functions that are case-sensitive. Even case-preserving filesystems > > > do not distinguish case in drive letters. */ > > > > If the return value of file-truename is used in comparisons, then > > perhaps the best answer would be unconditionally downcasing the drive > > letter (in the windows-specific part of the code) even if > > w32-long-file-name returns nil. If the problem was that the drive letter was not downcased, I don't see how did we arrive at downcasing the entire file name. I don't think the OP of this thread would oppose to having just the drive letter be returned in lower case. What am I missing?