Re: cvs: TSRM / tsrm_virtual_cwd.c
| From: | Andi Gutmans | Date: | Mon, 04 Nov 2002 09:36:03 +0000 |
| Subject: | Re: cvs: TSRM / tsrm_virtual_cwd.c | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-15799@lists.php.net to get a copy of this message | ||
At 02:53 PM 11/4/2002 -0500, Ilia A. wrote:
On November 4, 2002 03:43 am, Andi Gutmans wrote: At 02:41 PM 11/4/2002 -0500, Ilia A. wrote:I think it's best to add this argument to file_ex because the code exists already. AndiOn November 4, 2002 03:36 am, you wrote:OK thanks. Will an extra argument to file_ex() telling it not to run realpath() solve your problem? We need realpath() everywhere else but I think it'll be OK for unlink() only. Actually we need it several other places, originally I've added this code due to a bug in symlink/link implementation. The following functions would need not to resolve symlinks: virtual_rename(), virtual_lstat(), virtual_rmdir(), virtual_unlink(), virtual_chown(). Possibly others. The extra argument for file_ex would solve the problem, however given the fact this may be a common function, it may be a good idea to keep it seperate.I'll check it out tomorrow. Your code is problematic in any case as you're returning a pointer to the stack which is a no-no in C. I'll see if there's a way to do what you need without adding this virtual_link function. Can you revert it in the meantime?Quite correct, not sure why I missed that and the compiler did not catch that. I'll revert the patch momentarily.