diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c895706..1d71ff63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ _This release is scheduled to be released on 2025-01-01._ - [core] Fix missing `basePath` where `location.host` is used (#3613) - [compliments] croner library changed filenames used in latest version (#3624) - [linter] Fix ESLint ignore pattern which caused that default modules not to be linted (#3632) +- [core] Fix module path in case of sub/sub folder is used and use path.resolve for resolve `moduleFolder` and `defaultModuleFolder` in app.js (#3653) - [calendar] Update to resolve issues #3098 #3144 #3351 #3422 #3443 #3467 #3537 related to timezone changes - [calendar] Fix #3267 (styles array), also fixes event with both exdate AND recurrence(and testcase) - [calendar] Fix showEndsOnlyWithDuration not working, #3598, applies ONLY to full day events diff --git a/js/app.js b/js/app.js index 9d111c7e..0c2586af 100644 --- a/js/app.js +++ b/js/app.js @@ -164,10 +164,10 @@ function App () { const elements = module.split("/"); const moduleName = elements[elements.length - 1]; const env = getEnvVarsAsObj(); - let moduleFolder = `${__dirname}/../${env.modulesDir}/${module}`; + let moduleFolder = path.resolve(`${__dirname}/../${env.modulesDir}`, module); if (defaultModules.includes(moduleName)) { - const defaultModuleFolder = `${__dirname}/../modules/default/${module}`; + const defaultModuleFolder = path.resolve(`${__dirname}/../modules/default/`, module); if (process.env.JEST_WORKER_ID === undefined) { moduleFolder = defaultModuleFolder; } else { @@ -178,7 +178,7 @@ function App () { } } - const moduleFile = `${moduleFolder}/${module}.js`; + const moduleFile = `${moduleFolder}/${moduleName}.js`; try { fs.accessSync(moduleFile, fs.R_OK);