From 2025e390142d9bd9e3c0ff8647ada694577d1d39 Mon Sep 17 00:00:00 2001 From: Thomas Frieden Date: Tue, 21 Jun 2005 15:01:08 +0000 Subject: [PATCH] lstat would overwrite the passed-in name in lstat_lock with ReadLink git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14986 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- library/stat_lstat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/stat_lstat.c b/library/stat_lstat.c index b3eff5b..2a7f375 100644 --- a/library/stat_lstat.c +++ b/library/stat_lstat.c @@ -1,5 +1,5 @@ /* - * $Id: stat_lstat.c,v 1.10 2005-04-24 08:46:37 obarthel Exp $ + * $Id: stat_lstat.c,v 1.11 2005-06-21 15:01:08 tfrieden Exp $ * * :ts=4 * @@ -123,7 +123,8 @@ lstat_lock(const char *name,const int mode,int * link_length) } /* Now ask the file system to resolve the entire path. */ - result = ReadLink(dvp->dvp_Port,dvp->dvp_Lock,(STRPTR)name,(STRPTR)name,name_size); + result = ReadLink(dvp->dvp_Port,dvp->dvp_Lock,(STRPTR)name,(STRPTR)new_name,name_size); + if(result < 0) { /* This will return either -1 (resolution error) or -2