From: fujieda AT jaist DOT ac DOT jp (Kazuhiro Fujieda) Subject: Re: relative path script 19 Jan 1999 20:31:05 -0800 Message-ID: References: Mime-Version: 1.0 (generated by SEMI MIME-Edit 0.100 - "Shijima") Content-Type: text/plain; charset=US-ASCII To: cygwin32-developers AT cygnus DOT com >>> On 18 Jan 1999 17:06:54 +0900 >>> Kazuhiro Fujieda 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 | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology