From 2da6bc6a1e190501937a26836559286935b76234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 24 Jun 2020 11:06:09 +0200 Subject: [PATCH] electron-main: Rename the deletion method for the index. --- src/electron-main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/electron-main.js b/src/electron-main.js index 03dac06..00215cb 100644 --- a/src/electron-main.js +++ b/src/electron-main.js @@ -208,7 +208,7 @@ let mainWindow = null; global.appQuitting = false; -const deleteFolderRecursive = async (p) => { +const deleteContents = async (p) => { for (const entry of await afs.readdir(p)) { const curPath = path.join(p, entry); await afs.unlink(curPath); @@ -470,7 +470,7 @@ ipcMain.on('seshat', async function(ev, payload) { await recoveryIndex.shutdown(); try { - await deleteFolderRecursive(eventStorePath); + await deleteContents(eventStorePath); } catch (e) { } } else { @@ -509,7 +509,7 @@ ipcMain.on('seshat', async function(ev, payload) { case 'deleteEventIndex': { try { - await deleteFolderRecursive(eventStorePath); + await deleteContents(eventStorePath); } catch (e) { } }