Update gameDataService.js

This commit is contained in:
Gilles Lazures 2026-01-25 22:40:30 +01:00
parent eed626c268
commit f70719fd90

View File

@ -49,7 +49,7 @@ async function getGameFiles() {
async function getFile(basePath) { async function getFile(basePath) {
try { try {
const fixedPath = path.join(gameDataPath, basePath) const fixedPath = path.join(gameDataPath, decodeURI(basePath))
const fileMetadata = await fs.promises.stat(fixedPath) const fileMetadata = await fs.promises.stat(fixedPath)
if (fileMetadata.isDirectory()) { if (fileMetadata.isDirectory()) {
throw new DefaultError(409, "Can't download a directory", "", "NotDownloadableException") throw new DefaultError(409, "Can't download a directory", "", "NotDownloadableException")