This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
[PATCH] bash 2.04
- To: <cygwin-apps at sourceware dot cygnus dot com>
- Subject: [PATCH] bash 2.04
- From: "Jason Gouger" <cygwin at jason-gouger dot com>
- Date: Sun, 4 Mar 2001 22:35:46 -0800
Attached is a small patch to bash 2.04 which corrects the
general.c(full_pathname) function to properly check for a win32 absolute
pathname, prior to appending the current working directory.
The bug can be seen by trying the following:
bash$ cd /tmp
bash$ exec C:/cygwin/bin/bash.exe
It will error out with a cannot execute: No such file or directory error.
2001-03-04 Jason Gouger <cygwin@jason-gouger.com>
* general.c (full_pathname): add check for windows style pathname
--- general.c Wed Oct 11 05:15:56 2000
+++ general.c.fixed Sun Mar 4 21:57:30 2001
@@ -641,6 +641,12 @@
if ((*file == '/') && absolute_pathname (file))
return (file);
+#ifdef __CYGWIN__
+ if (*file && file[1] == ':' && (file[2] == '/' || file[2] == '\\') &&
+ ((*file >= 'a' && *file <= 'z') || (*file >= 'A' && *file <= 'Z')))
+ return (file);
+#endif /* __CYGWIN__ */
+
ret = sh_makepath ((char *)NULL, file, (MP_DOCWD|MP_RMDOT));
free (file);