mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-16 13:27:06 +02:00
lib/opfs: move getting dir into remove() try catch
This commit is contained in:
parent
d83d448190
commit
42b7a6ae60
@ -49,9 +49,9 @@ export class OPFSStorage extends AbstractStorage {
|
||||
export const removeFromFileStorage = async (filename: string) => {
|
||||
if (OPFSStorage.isAvailable()) {
|
||||
const root = await navigator.storage.getDirectory();
|
||||
const cobaltDir = await root.getDirectoryHandle(COBALT_PROCESSING_DIR);
|
||||
|
||||
try {
|
||||
const cobaltDir = await root.getDirectoryHandle(COBALT_PROCESSING_DIR);
|
||||
await cobaltDir.removeEntry(filename);
|
||||
} catch {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user