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:
1 file changed
+2
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user