fixing in the vm context instead, making the feature available in case realpath could be implemented as well

This commit is contained in:
2018-07-23 06:07:27 +01:00
parent 3ae20a1ca6
commit dba8e5098f
8 changed files with 31 additions and 23 deletions

View File

@@ -339,4 +339,4 @@ sxi32 SyAsciiToHex(sxi32 c) {
return c;
}
return 0;
}
}

View File

@@ -628,4 +628,15 @@ PH7_PRIVATE sxi32 SyStrToReal(const char *zSrc, sxu32 nLen, void *pOutVal, const
*(sxreal *)pOutVal = Val;
}
return zSrc >= zEnd ? SXRET_OK : SXERR_SYNTAX;
}
}
PH7_PRIVATE sxi32 SyRealpath(const char *zPath, char **fPath) {
#ifdef __UNIXES__
if(realpath(zPath, fPath) == NULL) {
#else
if(GetFullPathName(zPath, PATH_MAX, fPath, NULL) != 0) {
#endif
return PH7_IO_ERR;
}
return PH7_OK;
}