INNER CODE UNIT · C
canonicalize_existing_path
witchan/ios-mcp · mcp-root/main.c:80
static int canonicalize_existing_path(const char *path, char *buffer, size_t size) {
if (!path || !buffer || size == 0) {
return 0;
}
if (!realpath(path, buffer)) {
return 0;
}
return 1;
}
static int canonicalize_existing_bootstrap_path(const char *path, char *buffer, size_t size) {
if (canonicalize_existing_path(path, buffer, size)) {
return 1;
}
#ifdef MCP_ROOTHIDE