| 223 | } |
| 224 | |
| 225 | static void ei_cleanup(EILangProj *lp, cbm_store_t *store) { |
| 226 | if (store) |
| 227 | cbm_store_close(store); |
| 228 | if (lp->srv) { |
| 229 | cbm_mcp_server_free(lp->srv); |
| 230 | lp->srv = NULL; |
| 231 | } |
| 232 | free(lp->project); |
| 233 | lp->project = NULL; |
| 234 | th_rmtree(lp->tmpdir); |
| 235 | unlink(lp->dbpath); |
| 236 | char wal[600], shm[600]; |
| 237 | snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath); |
| 238 | unlink(wal); |
| 239 | snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath); |
| 240 | unlink(shm); |
| 241 | } |
| 242 | |
| 243 | /* Index `files`, check IMPORTS count >= `floor`. Dumps a diagnostic on |
| 244 | * failure so failures are self-diagnosable without re-running manually. */ |
no test coverage detected