1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-29 19:13:59 +02:00

Desktop: Add more log statements to attempt to fix #2968

This commit is contained in:
Laurent Cozic 2020-04-12 10:09:24 +01:00
parent aea3de982a
commit ab5c97f75a

View File

@ -153,6 +153,8 @@ class Note extends BaseItem {
useAbsolutePaths: false,
}, options);
this.logger().info('replaceResourceInternalToExternalLinks', 'options:', options, 'body:', body);
const resourceIds = await this.linkedResourceIds(body);
const Resource = this.getClass('Resource');
@ -180,6 +182,8 @@ class Note extends BaseItem {
pathsToTry.push(Resource.baseRelativeDirectoryPath());
}
this.logger().info('replaceResourceExternalToInternalLinks', 'options:', options, 'pathsToTry:', pathsToTry, 'body:', body);
for (const basePath of pathsToTry) {
const reString = `${pregQuote(`${basePath}/`)}[a-zA-Z0-9.]+`;
const re = new RegExp(reString, 'gi');