Mail Archives: djgpp-workers/2001/06/29/06:51:53
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 : '\\';
- Raw text -