mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
fix(core): fix wrong path on windows deploy (#15000)
This commit is contained in:
+3
-3
@@ -45,7 +45,7 @@ if (Object.keys(modules).length) {
|
||||
| {
|
||||
namespace: Namespace;
|
||||
};
|
||||
const namespace = module.split('/')[1];
|
||||
const namespace = module.split(/[/\\]/)[1];
|
||||
if ('namespace' in content) {
|
||||
namespaces[namespace] = Object.assign(
|
||||
{
|
||||
@@ -65,13 +65,13 @@ if (Object.keys(modules).length) {
|
||||
for (const path of content.route.path) {
|
||||
namespaces[namespace].routes[path] = {
|
||||
...content.route,
|
||||
location: module.split('/').slice(2).join('/'),
|
||||
location: module.split(/[/\\]/).slice(2).join('/'),
|
||||
};
|
||||
}
|
||||
} else {
|
||||
namespaces[namespace].routes[content.route.path] = {
|
||||
...content.route,
|
||||
location: module.split('/').slice(2).join('/'),
|
||||
location: module.split(/[/\\]/).slice(2).join('/'),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user