fix: correct routers/rules path resolution
pluginDir already points to the plugin install root, no need for .. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,8 +38,8 @@ export default {
|
||||
register(api: OpenClawPluginApi) {
|
||||
const config = normalizeConfig(api);
|
||||
const pluginDir = path.dirname(new URL(import.meta.url).pathname);
|
||||
const routersDir = config.routersDir || path.resolve(pluginDir, "..", "routers");
|
||||
const rulesFile = config.rulesFile || path.resolve(pluginDir, "..", "rules.json");
|
||||
const routersDir = config.routersDir || path.resolve(pluginDir, "routers");
|
||||
const rulesFile = config.rulesFile || path.resolve(pluginDir, "rules.json");
|
||||
|
||||
// Gateway lifecycle: init once
|
||||
if (!_G[LIFECYCLE_KEY]) {
|
||||
|
||||
Reference in New Issue
Block a user