Merge pull request #3154 from node-red/fix-windows-themes

Fix serving of theme files on Windows
This commit is contained in:
Nick O'Leary 2021-09-29 18:00:41 +01:00 committed by GitHub
commit 1b38e2eedf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ function serveFilesFromTheme(themeValue, themeApp, directory, baseDirectory) {
let fullPath = array[i];
if (baseDirectory) {
fullPath = path.resolve(baseDirectory,array[i]);
if (fullPath.indexOf(baseDirectory) !== 0) {
if (fullPath.indexOf(path.resolve(baseDirectory)) !== 0) {
continue;
}
}