diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-11-04 05:19:05 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-11-04 05:19:05 +0000 |
commit | 9087728798f633f578d1dd392204daeceeb83202 (patch) | |
tree | ae506755ff51a34d1d5a9f08d3ef124910bccfb3 /TSRM | |
parent | 67efacc344ee09f37b9fda914158194a2984feda (diff) | |
download | php-git-9087728798f633f578d1dd392204daeceeb83202.tar.gz |
Fix bug #20235.
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index bb5bac0c3a..37cb560f6b 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -727,7 +727,7 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) 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_lstat(const char *path, struct stat *buf TSRMLS_DC) 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; } |