Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com Date: Fri, 10 Dec 1999 15:03:23 -0500 From: Chris Faylor To: Corinna Vinschen Cc: cygdev Subject: Re: Patch: traling backslash Message-ID: <19991210150323.A1870@cygnus.com> Mail-Followup-To: Corinna Vinschen , cygdev References: <385156DC DOT 3A4516EA AT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <385156DC.3A4516EA@vinschen.de>; from corinna@vinschen.de on Fri, Dec 10, 1999 at 08:39:08PM +0100 On Fri, Dec 10, 1999 at 08:39:08PM +0100, Corinna Vinschen wrote: >I'm really surprised that nobody has seen this before. >I have found it only by chance. > >If a posix path is converted to a windows path that only consists >of a drive letter, it's resolved to ":" without a >trailing backslash. This is definitely wrong! In this case the >path is not interpreted as the root dir of this drive (as it's >meant by the dll) but DOS and it's sick successors interpret it >as the current working directory on this drive. This yields to >e.g. wrong fstat results: > >Imagine > mount Z: /home > > chmod 777 /home > ls -ld /home > drwxrwxrwx 3 who ever 0 today /home > > mkdir /home/foo > cd /home/foo > chmod 700 . > ls -ld . .. > drwx------ 2 who ever 0 today . > drwx------ 2 who ever 0 today .. > >The wrong output of .. is a result of the following operation: > > current working dir is Z:\foo > .. is converted to Z: according to the mount table > Z: is interpreted by Windows as Z:\foo Cygwin is supposed to interpret z: as z:\ in every situation. If it isn't, that's the bug. cgf