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

pull/3031/head
Laurent Cozic 2020-04-12 10:09:24 +01:00
parent aea3de982a
commit ab5c97f75a
1 changed files with 4 additions and 0 deletions

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');