- if (file[1] == '/') {
- if (PATH_MAX > (p_len = snprintf(path, PATH_MAX, "%.*s", f_len, file + 1))) {
- if ((flags & PSI_CPP_INCLUDE_ONCE) && zend_hash_str_exists(&cpp->once, path, p_len)) {
- return true;
- }
- return try_include(cpp, path, &parsed) && parsed;
+ if (!(flags & PSI_CPP_INCLUDE_NEXT) || *file == '/') {
+ /* first try as is, full or relative path */
+ if ((flags & PSI_CPP_INCLUDE_ONCE) && zend_hash_str_exists(&cpp->once, file, f_len)) {
+ return true;