MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / ia_path_valid

Function ia_path_valid

src/ui/atlas_impact.c:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43static bool ia_path_valid(const char *file) {
44 if (!file || !*file || strlen(file) >= 1024 || file[0] == '/' || file[0] == '\\')
45 return false;
46 for (const char *p = file; *p; p++) {
47 if (*p == '\\' || *p == ':' || (unsigned char)*p < 32)
48 return false;
49 if ((p == file || p[-1] == '/') && p[0] == '.' && p[1] == '.' && (p[2] == '/' || !p[2]))
50 return false;
51 }
52 return true;
53}
54
55typedef struct {
56 int64_t id, edge_id;

Calls

no outgoing calls

Tested by

no test coverage detected