diff options
Diffstat (limited to 'main/fopen_wrappers.c')
| -rw-r--r-- | main/fopen_wrappers.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 1d6797997a..116985675e 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -973,6 +973,28 @@ PHPAPI char *php_strip_url_passwd(char *url) } +#if 1 + +PHPAPI char *expand_filepath(char *filepath) +{ + cwd_state new_state; + char cwd[MAXPATHLEN+1]; + char *result; + + result = getcwd(cwd, MAXPATHLEN); + if (!result) { + cwd[0] = '\0'; + } + + new_state.cwd = strdup(cwd); + new_state.cwd_length = strlen(cwd); + + virtual_file_ex(&new_state, filepath, NULL); + return new_state.cwd; +} + +#else + PHPAPI char *expand_filepath(char *filepath) { char *retval = NULL; @@ -1013,6 +1035,8 @@ PHPAPI char *expand_filepath(char *filepath) return retval; } +#endif + /* * Local variables: * tab-width: 4 |
