You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
@@ -236,15 +236,20 @@ export class WorkerApi {
|
|||||||
const folderName = removeReservedWords(basename(path));
|
const folderName = removeReservedWords(basename(path));
|
||||||
|
|
||||||
let handle: FileSystemDirectoryHandle;
|
let handle: FileSystemDirectoryHandle;
|
||||||
try {
|
if (!parent) {
|
||||||
handle = await parent.getDirectoryHandle(folderName, { create });
|
logger.debug('Parent not found for path', path);
|
||||||
this.directoryHandleCache_.set(path, handle);
|
|
||||||
} catch (error) {
|
|
||||||
if (!isNotFoundError(error)) {
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
|
|
||||||
handle = null;
|
handle = null;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
handle = await parent.getDirectoryHandle(folderName, { create });
|
||||||
|
this.directoryHandleCache_.set(path, handle);
|
||||||
|
} catch (error) {
|
||||||
|
if (!isNotFoundError(error)) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
handle = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return handle;
|
return handle;
|
||||||
|
|||||||
Reference in New Issue
Block a user