www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/12/10/22:43:05

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
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 21:41:14 -0500
From: Chris Faylor <cgf AT cygnus DOT com>
To: Corinna Vinschen <corinna AT vinschen DOT de>
Cc: cygdev <cygwin-developers AT sourceware DOT cygnus DOT com>
Subject: Re: Patch: traling backslash
Message-ID: <19991210214114.A4054@cygnus.com>
Mail-Followup-To: Corinna Vinschen <corinna AT vinschen DOT de>,
cygdev <cygwin-developers AT sourceware DOT cygnus DOT com>
References: <385156DC DOT 3A4516EA AT vinschen DOT de>
Mime-Version: 1.0
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

Sorry that I didn't have time to give this my full attention earlier.

This looks basically ok, but I think you left in a section of code that
shouldn't be there.  It seems to run a while loop twice looking for a
'\\'.  That can't be right.  Is this just something wrong with the
patch?

Also, I'm not sure what this is going to do to those mount tables which
have just a "c:" in them.  I think they should work ok but somehow I
have a nagging feeling that there might be a problem there somewhere.

cgf

On Fri, Dec 10, 1999 at 08:39:08PM +0100, Corinna Vinschen wrote:
>ChangeLog:
>==========
>
>Dec 10 20:34:00 1999  Corinna Vinschen  <corinna AT vinschen DOT de>
>
>	* path.cc (path_conv::path_conv): If path is converted to
>	only "X:\", don't eliminate trailing backslash. If path is
>	converted to only "X:", add trailing backslash.
>
>
>Index: path.cc
>===================================================================
>RCS file: /src/cvsroot/winsup-991207/path.cc,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 path.cc
>--- path.cc     1999/12/08 22:51:38     1.1.1.1
>+++ path.cc     1999/12/10 19:18:12
>@@ -221,6 +221,15 @@ path_conv::path_conv (const char *src, s
>
>       /* Eat trailing slashes */
>       char *tail = strchr (full_path, '\0');
>+      /* If path is only a drivename, Windows interprets it as
>+         the current working directory on this drive instead of
>+         the root dir which is what we want. So we need
>+         the trailing backslash in this case. */
>+      while (tail > full_path + 3 && (*--tail == '\\'))
>+        *tail = '\0';
>+      if (full_path[0] && full_path[1] == ':' && full_path[2] == '\0')
>+        strcat (full_path, "\\");
>+
>       while (tail > full_path && (*--tail == '\\'))
>        *tail = '\0';

-- 
cgf AT cygnus DOT com
http://www.cygnus.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019