Changed fs.cpSync to use recursive copying

This commit is contained in:
Isaac McFadyen
2024-04-18 16:04:04 -04:00
parent 3822ae9356
commit 15a8adb0b9
2 changed files with 11 additions and 3 deletions

View File

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