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