Re: cvs: TSRM / tsrm_virtual_cwd.c

From: Date: Mon, 04 Nov 2002 08:15:02 +0000
Subject: Re: cvs: TSRM / tsrm_virtual_cwd.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-15791@lists.php.net to get a copy of this message
I don't understand what you're doing here. Can you please next time post this kind of stuff before you submit a fix? What is virtual_link()? Do you realize it returns a pointer to the stack when the stack is gone already? Can you please explain what was wrong with the code before you added it? Andi At 05:19 AM 11/4/2002 +0000, Ilia Alshanetsky wrote:
iliaa           Mon Nov  4 00:19:05 2002 EDT
Modified files:
    /TSRM       tsrm_virtual_cwd.c
Log: Fix bug #20235. Index: TSRM/tsrm_virtual_cwd.c diff -u TSRM/tsrm_virtual_cwd.c:1.36 TSRM/tsrm_virtual_cwd.c:1.37
--- TSRM/tsrm_virtual_cwd.c:1.36        Tue Oct 29 02:32:52 2002
+++ TSRM/tsrm_virtual_cwd.c     Mon Nov  4 00:19:05 2002
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: tsrm_virtual_cwd.c,v 1.36 2002/10/29 07:32:52 shane Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.37 2002/11/04 05:19:05 iliaa Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -727,7 +727,7 @@
        int retval;
        char *p;
-       p = virtual_link(path, strlen(path) TSRMLS_CC);
+       p = virtual_link((char *)path, strlen(path) TSRMLS_CC);
        retval = lstat(p, buf);
        return retval;
@@ -736,15 +736,12 @@ CWD_API int virtual_unlink(const char *path TSRMLS_DC) {
-       cwd_state new_state;
        int retval;
+       char *resolved_path;
-       CWD_STATE_COPY(&new_state, &CWDG(cwd));
-       virtual_file_ex(&new_state, path, NULL);
+       resolved_path = virtual_link((char *)path, strlen(path) TSRMLS_CC);
+       retval = unlink(resolved_path);
-       retval = unlink(new_state.cwd);
-
-       CWD_STATE_FREE(&new_state);
        return retval;
} -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.cvs (#15791) next »