Mail Archives: cygwin-developers/1999/01/19/20:31:05
>>> On 18 Jan 1999 17:06:54 +0900
>>> Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp> said:
> For example,
> $ echo '#!/bin/sh' > foo
> $ mkdir bar
> $ cd bar
> $ ../foo
> ../../foo: Can't open ../../foo
(snip)
The following patch fixes this problem. Either script found
through a relative search path or directly specified by a
relative path works fine.
--- spawn.cc- Mon Jan 18 17:54:48 1999
+++ spawn.cc Tue Jan 19 13:32:07 1999
@@ -404,7 +404,7 @@ debug_printf ("argv[%d] = '%s'", argc, a
* but not /usr/local/bin/wish -f tkman!
* We don't modify anything, if script has qulified path.
*/
- if (strpbrk (saved_prog_arg, "\\/") && !isabspath (copy))
+ if (strpbrk (saved_prog_arg, "\\/") && !strpbrk (copy, "\\/"))
{
debug_printf ("getting path of %s, copy %s", saved_prog_arg, buf);
cygwin_split_path (saved_prog_arg, strchr(f, '\0'), buf);
____
| AIST Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
| HOKURIKU School of Information Science
o_/ 1990 Japan Advanced Institute of Science and Technology
- Raw text -