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

Function cbm_hermes_home_dir_for

src/cli/cli.c:2792–2804  ·  view source on GitHub ↗

#1180: native Windows Hermes -- the install.ps1 CLI, the MSIX package and * the Desktop app -- defaults HERMES_HOME to %LOCALAPPDATA%\hermes and keeps a * legacy ~/.hermes only while the new directory is absent (hermes-agent * website/docs/user-guide/windows-native.md "Data layout"; * apps/desktop/electron/data-paths.mjs resolveDesktopHermesHome). Probing * only ~/.hermes missed those install

Source from the content-addressed store, hash-verified

2790 * only ~/.hermes missed those installs and aimed config.yaml at a home Hermes
2791 * never reads. Other platforms use ~/.hermes. */
2792static void cbm_hermes_home_dir_for(const char *home_dir, bool windows, char *out, size_t out_sz) {
2793 const char *fallback = ".hermes";
2794 if (windows) {
2795 char native[CLI_BUF_1K];
2796 char legacy[CLI_BUF_1K];
2797 snprintf(native, sizeof(native), "%s/AppData/Local/hermes", home_dir);
2798 snprintf(legacy, sizeof(legacy), "%s/.hermes", home_dir);
2799 if (dir_exists(native) || !dir_exists(legacy)) {
2800 fallback = "AppData/Local/hermes";
2801 }
2802 }
2803 cbm_env_home_dir("HERMES_HOME", home_dir, fallback, out, out_sz);
2804}
2805
2806static void cbm_hermes_home_dir(const char *home_dir, char *out, size_t out_sz) {
2807#ifdef _WIN32

Callers 2

cbm_hermes_home_dirFunction · 0.85

Calls 2

dir_existsFunction · 0.85
cbm_env_home_dirFunction · 0.85

Tested by

no test coverage detected