From 31bb3bf4be356b234235c5afce78ac580f83fd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= Date: Thu, 13 May 2021 08:08:59 +0200 Subject: [PATCH] When filtering theme files, be a bit more strict Depending on your text editor, it can happen that there are temporary files in your themes directory which cause errors during while executing the generateLayerOverview.ts script. --- scripts/generateLayerOverview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts index 87cda73ddf..7bf3c939a8 100644 --- a/scripts/generateLayerOverview.ts +++ b/scripts/generateLayerOverview.ts @@ -29,7 +29,7 @@ const layerFiles = ScriptUtils.readDirRecSync("./assets/layers") } }) const themeFiles: any[] = ScriptUtils.readDirRecSync("./assets/themes") - .filter(path => path.indexOf(".json") > 0) + .filter(path => path.endsWith(".json")) .filter(path => path.indexOf("license_info.json") < 0) .map(path => { return JSON.parse(readFileSync(path, "UTF8"));