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

Function cbm_watcher_root_missing_errno

src/watcher/watcher.c:867–876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

865/* ── Stale-root pruning (#286) ──────────────────────────────────── */
866
867bool cbm_watcher_root_missing_errno(int err) {
868 /* Only ENOENT/ENOTDIR mean the root itself is gone. Anything else
869 * (EACCES, EIO, ELOOP, a transient network mount, macOS TCC permission
870 * revocation) is uncertainty: the directory may still exist even though
871 * we cannot see it right now — never treat it as a deletion signal.
872 * Windows (mingw/UCRT) maps ERROR_FILE_NOT_FOUND / ERROR_PATH_NOT_FOUND
873 * to ENOENT, so the same check holds there (same convention as
874 * find_deleted_files in pipeline_incremental.c). */
875 return err == ENOENT || err == ENOTDIR;
876}
877
878typedef enum {
879 ROOT_PRESENT = 0, /* stat succeeded and the root is a directory */

Callers 2

root_statusFunction · 0.85
test_watcher.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected