mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:51:24 +00:00
perf(test): reduce module reload overhead in key suites
This commit is contained in:
@@ -7,7 +7,7 @@ import http, { type IncomingMessage, type Server, type ServerResponse } from "no
|
||||
import path from "node:path";
|
||||
import { type WebSocket, WebSocketServer } from "ws";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
import { STATE_DIR } from "../config/paths.js";
|
||||
import { resolveStateDir } from "../config/paths.js";
|
||||
import { isTruthyEnvValue } from "../infra/env.js";
|
||||
import { SafeOpenError, openFileWithinRoot } from "../infra/fs-safe.js";
|
||||
import { detectMime } from "../media/mime.js";
|
||||
@@ -235,7 +235,7 @@ async function prepareCanvasRoot(rootDir: string) {
|
||||
}
|
||||
|
||||
function resolveDefaultCanvasRoot(): string {
|
||||
const candidates = [path.join(STATE_DIR, "canvas")];
|
||||
const candidates = [path.join(resolveStateDir(), "canvas")];
|
||||
const existing = candidates.find((dir) => {
|
||||
try {
|
||||
return fsSync.statSync(dir).isDirectory();
|
||||
|
||||
Reference in New Issue
Block a user