Switched fs.renameSync to fs.copyFileSync

This commit is contained in:
Isaac McFadyen
2024-04-18 15:50:27 -04:00
parent 59bb04f1b3
commit 3822ae9356
6 changed files with 16 additions and 8 deletions

View File

@ -680,7 +680,8 @@ router.post('/rename', jsonParser, async function (request, response) {
// Rename chats folder
if (fs.existsSync(oldChatsPath) && !fs.existsSync(newChatsPath)) {
fs.renameSync(oldChatsPath, newChatsPath);
fs.cpSync(oldChatsPath, newChatsPath);
fs.rmSync(oldChatsPath, { recursive: true, force: true });
}
// Remove the old character file