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
+1
-1
@@ -360,11 +360,11 @@ export class PandocTypstConverter {
|
|||||||
this.resourcePathCacheTimestamp = now;
|
this.resourcePathCacheTimestamp = now;
|
||||||
this.resourcePathCacheVaultPath = this.pandocOptions.vaultBasePath;
|
this.resourcePathCacheVaultPath = this.pandocOptions.vaultBasePath;
|
||||||
console.log(`Export: Cached ${foundResourcePaths.length} resource paths for future use`);
|
console.log(`Export: Cached ${foundResourcePaths.length} resource paths for future use`);
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('Could not scan vault for attachment directories:', e);
|
console.warn('Could not scan vault for attachment directories:', e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Use universal wrapper with --template and pass actual template as template_path variable
|
// Use universal wrapper with --template and pass actual template as template_path variable
|
||||||
if (this.pandocOptions.template) {
|
if (this.pandocOptions.template) {
|
||||||
|
|||||||
Reference in new issue
Block a user