Improves resource path caching error handling

Moves the catch block for resource path scanning to be inside the try block.
This ensures that errors during resource path caching do not prevent the timestamp from being updated, potentially leading to repeated scanning.
This commit is contained in:
AlexKucera committed 2025-09-04 16:38:02 +02:00
1 parent 3fc6219ad1
commit 2c5b916978
1 file changed
+2 -2
+2 -2
View File
@@ -360,9 +360,9 @@ export class PandocTypstConverter {
this.resourcePathCacheTimestamp = now;
this.resourcePathCacheVaultPath = this.pandocOptions.vaultBasePath;
console.log(`Export: Cached ${foundResourcePaths.length} resource paths for future use`);
} catch (e) {
console.warn('Could not scan vault for attachment directories:', e);
}
} catch (e) {
console.warn('Could not scan vault for attachment directories:', e);
}
}