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

Function diag_tmp_base

src/foundation/diagnostics.c:250–262  ·  view source on GitHub ↗

Diagnostics placement honors the documented contract ($TMPDIR, /tmp * fallback) without touching cbm_tmpdir(), whose many other callers keep * their established behavior. Windows already resolves the real user temp. */

Source from the content-addressed store, hash-verified

248 * fallback) without touching cbm_tmpdir(), whose many other callers keep
249 * their established behavior. Windows already resolves the real user temp. */
250static const char *diag_tmp_base(char *buffer, size_t size) {
251#ifdef _WIN32
252 (void)buffer;
253 (void)size;
254 return cbm_tmpdir();
255#else
256 cbm_safe_getenv("TMPDIR", buffer, size, NULL);
257 if (buffer[0] != '\0') {
258 return buffer;
259 }
260 return "/tmp";
261#endif
262}
263
264static bool diag_directory_prepare(void) {
265 char tmp_base[CBM_PATH_MAX];

Callers 1

diag_directory_prepareFunction · 0.85

Calls 2

cbm_tmpdirFunction · 0.85
cbm_safe_getenvFunction · 0.85

Tested by

no test coverage detected