From: "Laurynas Biveinis" Date: Fri, 29 Jun 2001 12:51:01 +0200 To: djgpp-workers AT delorie DOT com Cc: snowball3 AT bigfoot DOT com Subject: Bug & fix for Bash 2.05 Message-ID: <20010629125101.A205@lauras.lt> Mail-Followup-To: djgpp-workers AT delorie DOT com, snowball3 AT bigfoot DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.18i Reply-To: djgpp-workers AT delorie DOT com So far I'm hunting the bugs in the new bash, and while investigating the bug I've reported earlier, I've encountered another one: sh-2.05$ printenv PWD c;/djgpp/gnu/bash-2.05/djbuild ^ Bash 2.04 behaves correctly. I'm not familiar with this code, but after some gdb'ing I think I've found the problem and correct fix: make_dos_path(), if given usual DOS style path and told to stop processing on ':' would not recognize the colon in 'c:/foo' correctly - instead it thinks that 'c' and '/foo' are two separate paths. Since the code knew how to convert /dev/c to c: and not to loose this colon later, I've written a similar fix. It works. Sadly, it still does not fix my original problem - I'm continuing the hunting. Laurynas --- dospath.c.old Thu Jun 14 13:05:42 2001 +++ dospath.c Fri Jun 29 12:39:36 2001 @@ -482,6 +482,18 @@ in += 6; } + else if (in[1] == ':') + { + /* In this case assume that this is a c:/foo style path and process */ + /* further, even if we have ':' as a stop character. Otherwise drive */ + /* letter and directories will be treated as a separate components, */ + /* resulting in "c;/foo" path later. */ + out[0] = in[0]; + out[1] = in[1]; + out += 2; + in += 2; + } + while (*in && *in != stop_char) { *out = (*in != '/') ? *in : '\\';