From 2c5b9169784981e853920871bc4e6ea5b977867a Mon Sep 17 00:00:00 2001 From: Alexander Kucera Date: Thu, 4 Sep 2025 16:38:02 +0200 Subject: [PATCH] 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. --- src/converters/PandocTypstConverter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/converters/PandocTypstConverter.ts b/src/converters/PandocTypstConverter.ts index 6680a11..09b3d3d 100644 --- a/src/converters/PandocTypstConverter.ts +++ b/src/converters/PandocTypstConverter.ts @@ -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); } }