From c4d90732c504f27405b11cadd9bdbb096a946c2d Mon Sep 17 00:00:00 2001 From: Esinko Date: Tue, 20 Aug 2024 20:58:06 +0300 Subject: [PATCH] fix: github workflow and missing names --- .github/workflows/main.yml | 2 +- src/service-workers/workers/filesystem.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0778a1e..9f91313 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: npm ci npm run build echo "matikkaeditori.fi" >> dist/CNAME - echo "VERSION: " >> build/VERSION + echo "VERSION: " >> dist/VERSION echo $(git rev-parse --short "$GITHUB_SHA") >> dist/VERSION git config user.name github-actions git config user.email github-actions@github.com diff --git a/src/service-workers/workers/filesystem.js b/src/service-workers/workers/filesystem.js index b1fefc3..1f9d052 100644 --- a/src/service-workers/workers/filesystem.js +++ b/src/service-workers/workers/filesystem.js @@ -99,6 +99,10 @@ class Filesystem { const isValid = await this.validate(JSON.stringify(jsonData), json.checksum) if (isValid) { console.debug("[ Filesystem ] Checksum valid, read task concluded successfully.") + if (!json.name) { + console.warn("[ Filesystem ] Name is missing from item!") + json.name = `Nimeämätön ${json.t === 0 ? "tiedosto" : "kansio"}` + } resolve(json) } else { // TODO: Handle this better