mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 08:21:26 +00:00
fix(plugins): ignore archived extension dirs during discovery
Co-authored-by: chenzhuoms <chenzhuoms@users.noreply.github.com>
This commit is contained in:
@@ -62,7 +62,9 @@ export async function installPackageDir(params: {
|
||||
params.logger?.info?.(`Installing to ${params.targetDir}…`);
|
||||
let backupDir: string | null = null;
|
||||
if (params.mode === "update" && (await fileExists(params.targetDir))) {
|
||||
backupDir = `${params.targetDir}.backup-${Date.now()}`;
|
||||
const backupRoot = path.join(path.dirname(params.targetDir), ".openclaw-install-backups");
|
||||
backupDir = path.join(backupRoot, `${path.basename(params.targetDir)}-${Date.now()}`);
|
||||
await fs.mkdir(backupRoot, { recursive: true });
|
||||
await fs.rename(params.targetDir, backupDir);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user