| 2310 | } |
| 2311 | |
| 2312 | static bool cbm_openclaw_internal_home(const char *home_dir, char *out, size_t out_sz) { |
| 2313 | char env_buf[CLI_BUF_1K]; |
| 2314 | const char *custom = cbm_safe_getenv("OPENCLAW_HOME", env_buf, sizeof(env_buf), NULL); |
| 2315 | if (!custom || !custom[0]) { |
| 2316 | int written = snprintf(out, out_sz, "%s", home_dir); |
| 2317 | return written > 0 && (size_t)written < out_sz; |
| 2318 | } |
| 2319 | return cbm_expand_user_path(home_dir, custom, out, out_sz); |
| 2320 | } |
| 2321 | |
| 2322 | static bool cbm_openclaw_state_dir(const char *home_dir, char *out, size_t out_sz) { |
| 2323 | char internal_home[CLI_BUF_1K]; |
no test coverage detected