This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: normalize_posix_path can't take root access into account yet.


I don't understand.  Can you provide an example of how this is failing?
I don't see a difference between my change and yours.

cgf

On Fri, Apr 21, 2000 at 11:46:02AM +0900, Kazuhiro Fujieda wrote:
>normalize_posix_path can't take root access into account yet.
>The following patch can fix it.
>
>ChangeLog:
>Fri Apr 21 11:29:43 2000  Kazuhiro Fujieda <fujieda@jaist.ac.jp>
>	* path.cc (normalize_posix_path): Previous change failed to take root
>	access into account, too.
>
>--- path.cc-1.12	Fri Apr 21 11:43:53 2000
>+++ path.cc	Fri Apr 21 11:29:43 2000
>@@ -620,7 +620,7 @@ normalize_posix_path (const char *cwd, c
> 	}
>     }
>   if (dst > (dst_start + 1) && dst[-1] == '.' && SLASH_P (dst[-2]))
>-    dst -= dst[2] ? 2 : 1;
>+    dst -= (dst > dst_start + 2) ? 2 : 1;
>   *dst = 0;
>   debug_printf ("%s = normalize_posix_path (%s)", dst_start, src_start);
>   return 0;
>
>____
>  | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
>  | HOKURIKU  School of Information Science
>o_/ 1990      Japan Advanced Institute of Science and Technology

-- 
cgf@cygnus.com                        Cygnus Solutions, a Red Hat company
http://sourcware.cygnus.com/          http://www.redhat.com/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]