./ and ../ are still relative paths. Only files beginning with / and X:\ should be included directly.
This commit is contained in:
parent
d3be8d2a1a
commit
f42f51f037
|
@ -2875,12 +2875,11 @@ PH7_PRIVATE void *PH7_StreamOpenHandle(ph7_vm *pVm, const ph7_io_stream *pStream
|
||||||
}
|
}
|
||||||
SyStringInitFromBuf(&sFile, zFile, SyStrlen(zFile));
|
SyStringInitFromBuf(&sFile, zFile, SyStrlen(zFile));
|
||||||
if(use_include) {
|
if(use_include) {
|
||||||
if(sFile.zString[0] == '/' ||
|
if(sFile.zString[0] == '/'
|
||||||
#ifdef __WINNT__
|
#ifdef __WINNT__
|
||||||
(sFile.nByte > 2 && sFile.zString[1] == ':' && (sFile.zString[2] == '\\' || sFile.zString[2] == '/')) ||
|
|| (sFile.nByte > 2 && sFile.zString[1] == ':' && (sFile.zString[2] == '\\' || sFile.zString[2] == '/')) ||
|
||||||
#endif
|
#endif
|
||||||
(sFile.nByte > 1 && sFile.zString[0] == '.' && sFile.zString[1] == '/') ||
|
) {
|
||||||
(sFile.nByte > 2 && sFile.zString[0] == '.' && sFile.zString[1] == '.' && sFile.zString[2] == '/')) {
|
|
||||||
/* Get real path to the included file */
|
/* Get real path to the included file */
|
||||||
SyRealPath(zFile, sFilePath);
|
SyRealPath(zFile, sFilePath);
|
||||||
/* Open the file directly */
|
/* Open the file directly */
|
||||||
|
|
Loading…
Reference in New Issue