MFH: Fix expand_filepath when including relative files, ideally you should test you code...

This commit is contained in:
Scott MacVicar 2007-10-09 10:05:08 +00:00
parent e2b5419e05
commit 52debae82e

View File

@ -621,8 +621,10 @@ PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC)
copy_len = strlen(filepath) > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : strlen(filepath); copy_len = strlen(filepath) > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : strlen(filepath);
real_path = estrndup(filepath, copy_len); real_path = estrndup(filepath, copy_len);
return real_path; return real_path;
} else {
cwd[0] = '\0';
} }
} else { } else if (!result) {
cwd[0] = '\0'; cwd[0] = '\0';
} }
} }