generated from azures04/Base-REST-API
Update gameDataService.js
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user