From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: init_buffer PWD fix Date: Mon, 22 Apr 2002 00:01:20 -0700 (PDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200204220701.g3M71K923828@sic.twinsun.com> References: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1019459001 21359 127.0.0.1 (22 Apr 2002 07:03:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 22 Apr 2002 07:03:21 +0000 (UTC) Cc: knagano@sodan.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16zXr7-0005YO-00 for ; Mon, 22 Apr 2002 09:03:21 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16zXrh-00056A-00 for ; Mon, 22 Apr 2002 09:03:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16zXqx-0000cl-00; Mon, 22 Apr 2002 03:03:11 -0400 Original-Received: from alcor.twinsun.com ([198.147.65.9]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16zXpD-0000Yh-00 for ; Mon, 22 Apr 2002 03:01:23 -0400 Original-Received: from sic.twinsun.com ([192.54.239.17]) by alcor.twinsun.com (8.12.1/8.12.1) with ESMTP id g3M71LPd012438; Mon, 22 Apr 2002 00:01:21 -0700 (PDT) Original-Received: (eggert@localhost) by sic.twinsun.com (8.11.6+Sun/8.11.6) id g3M71K923828; Mon, 22 Apr 2002 00:01:20 -0700 (PDT) Original-To: eliz@is.elta.co.il In-Reply-To: (eliz@is.elta.co.il) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2983 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2983 > Date: Mon, 22 Apr 2002 10:53:47 +0300 (IDT) > From: Eli Zaretskii > > > PWD is unreliable on all platforms, but Emacs works around the problem > > with a similar method on all platforms by statting $PWD and ".", and > > using $PWD only if stat results agree. What is the problem with > > this workaround on Windows? > > The problem is probably what you'd guess: the inode comparison doesn't > work on Windows as well as it does on Posix platforms... If memory serves, that problem occurs on some Windows platforms but not on others, so any workaround should apply only to Windows platforms where 'stat' is broken. Fcopy_file uses the conditional `#if !defined (DOS_NT) || __DJGPP__ > 1' before inspecting st_ino; would that be appropriate here too? > But even so, I still don't see how this would cause a failure. If 'stat' is broken, then Emacs can think that $PWD is correct even when it is not.