mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Add try catch for each unlink
This commit is contained in:
parent
e4c2890d1a
commit
b015d2e536
@ -62,7 +62,9 @@ async function getOrCreatePassphrase(key: string): Promise<string> {
|
|||||||
const deleteContents = async (p: string): Promise<void> => {
|
const deleteContents = async (p: string): Promise<void> => {
|
||||||
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);
|
||||||
|
try {
|
||||||
await afs.unlink(curPath);
|
await afs.unlink(curPath);
|
||||||
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user