mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 16:18:26 +00:00
fix: migrate legacy state dirs
This commit is contained in:
@@ -16,10 +16,10 @@ export function resolveIsNixMode(env: NodeJS.ProcessEnv = process.env): boolean
|
||||
|
||||
export const isNixMode = resolveIsNixMode();
|
||||
|
||||
const LEGACY_STATE_DIRNAMES = [] as const;
|
||||
const LEGACY_STATE_DIRNAMES = [".clawdbot", ".moltbot", ".moldbot"] as const;
|
||||
const NEW_STATE_DIRNAME = ".openclaw";
|
||||
const CONFIG_FILENAME = "openclaw.json";
|
||||
const LEGACY_CONFIG_FILENAMES = [] as const;
|
||||
const LEGACY_CONFIG_FILENAMES = ["clawdbot.json", "moltbot.json", "moldbot.json"] as const;
|
||||
|
||||
function legacyStateDirs(homedir: () => string = os.homedir): string[] {
|
||||
return LEGACY_STATE_DIRNAMES.map((dir) => path.join(homedir(), dir));
|
||||
|
||||
Reference in New Issue
Block a user