From f5dcc7902290465a61cc826a652da56c75778763 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Sat, 29 Apr 2023 14:19:43 +0900 Subject: [PATCH] fixed bug preventing character creation --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 043ef2c06..cb7f9e939 100644 --- a/server.js +++ b/server.js @@ -646,7 +646,7 @@ app.post("/createcharacter", urlencodedParser, function (request, response) { const internalName = getPngName(request.body.ch_name); const avatarName = `${internalName}.png`; const defaultAvatar = './public/img/ai4.png'; - const chatsPath = path.join(chatsPath, internalName); + chatsPath = path.join(chatsPath, internalName); if (!fs.existsSync(chatsPath)) fs.mkdirSync(chatsPath); @@ -681,7 +681,7 @@ app.post("/renamecharacter", jsonParser, async function (request, response) { const oldData = json5.parse(rawOldData); oldData['name'] = newName; const newData = JSON.stringify(oldData); - + // Write data to new location await charaWrite(oldAvatarPath, newData, newInternalName);