mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-31 13:39:58 +01:00
electron-main: Rename the deletion method for the index.
This commit is contained in:
parent
141107c678
commit
2da6bc6a1e
@ -208,7 +208,7 @@ let mainWindow = null;
|
|||||||
global.appQuitting = false;
|
global.appQuitting = false;
|
||||||
|
|
||||||
|
|
||||||
const deleteFolderRecursive = async (p) => {
|
const deleteContents = async (p) => {
|
||||||
for (const entry of await afs.readdir(p)) {
|
for (const entry of await afs.readdir(p)) {
|
||||||
const curPath = path.join(p, entry);
|
const curPath = path.join(p, entry);
|
||||||
await afs.unlink(curPath);
|
await afs.unlink(curPath);
|
||||||
@ -470,7 +470,7 @@ ipcMain.on('seshat', async function(ev, payload) {
|
|||||||
await recoveryIndex.shutdown();
|
await recoveryIndex.shutdown();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await deleteFolderRecursive(eventStorePath);
|
await deleteContents(eventStorePath);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -509,7 +509,7 @@ ipcMain.on('seshat', async function(ev, payload) {
|
|||||||
case 'deleteEventIndex':
|
case 'deleteEventIndex':
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
await deleteFolderRecursive(eventStorePath);
|
await deleteContents(eventStorePath);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user