From 33482e0b41cd80ab46f81cde1296a68ad1f3053c Mon Sep 17 00:00:00 2001 From: azures04 Date: Mon, 2 Feb 2026 04:48:24 +0100 Subject: [PATCH] Update productsFileService.js --- services/productsFileService.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/productsFileService.js b/services/productsFileService.js index a5fc0e6..3be2993 100644 --- a/services/productsFileService.js +++ b/services/productsFileService.js @@ -60,7 +60,7 @@ async function getProductFiles(productName, platform) { async function getFile(basePath, productName, productPlatform) { try { - const fixedPath = path.join(productsDataPath, productName, productPlatform, decodeURI(basePath)) + const fixedPath = path.join(productsDataPath, productName, "files", productPlatform, decodeURI(basePath)) const fileMetadata = await fs.promises.stat(fixedPath) if (fileMetadata.isDirectory()) { throw new DefaultError(409, "Can't download a directory", "", "NotDownloadableException") @@ -76,8 +76,8 @@ async function getFile(basePath, productName, productPlatform) { } } -async function canAccess(productName, productPlatform) { - const fixedPath = path.join(productsDataPath, productName, productPlatform, ".brikcfg") +async function canAccess(productName) { + const fixedPath = path.join(productsDataPath, productName, "files", ".brikcfg") const fileState = await fs.promises.exists(fixedPath, fs.constants.F_OK) if (!fileState) { return { code: 200 }