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

Function rp409_mkdirp

tests/repro/repro_issue409.c:93–104  ·  view source on GitHub ↗

Recursively create directory (simple two-level: parent + child). */

Source from the content-addressed store, hash-verified

91
92/* Recursively create directory (simple two-level: parent + child). */
93static int rp409_mkdirp(const char *path) {
94 char tmp[1024];
95 snprintf(tmp, sizeof(tmp), "%s", path);
96 for (char *p = tmp + 1; *p; p++) {
97 if (*p == '/') {
98 *p = '\0';
99 cbm_mkdir(tmp);
100 *p = '/';
101 }
102 }
103 return cbm_mkdir(tmp) == 0 || errno == EEXIST ? 0 : -1;
104}
105
106/* ── Test ──────────────────────────────────────────────────────────── */
107

Callers 1

repro_issue409.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected