From c9f40ea23f2a881cc3b7e614cefd06e592be3d23 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 8 Jan 2021 17:49:53 +0000 Subject: [PATCH] Desktop, Cli: Resolves #4310: Do not display error message when fixing ENEX resource mime type --- packages/lib/import-enex.js | 2 +- packages/lib/services/CommandService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lib/import-enex.js b/packages/lib/import-enex.js index ba6b52545..bc9c4a8ef 100644 --- a/packages/lib/import-enex.js +++ b/packages/lib/import-enex.js @@ -528,7 +528,7 @@ function importEnex(parentFolderId, filePath, importOptions = null) { if (noteResource.filename) { const mimeTypeFromFile = mime.fromFilename(noteResource.filename); if (mimeTypeFromFile && mimeTypeFromFile !== mimeType) { - importOptions.onError(new Error(`Invalid mime type "${mimeType}" for resource "${noteResource.filename}". Using "${mimeTypeFromFile}" instead.`)); + console.info(`Invalid mime type "${mimeType}" for resource "${noteResource.filename}". Using "${mimeTypeFromFile}" instead.`); mimeType = mimeTypeFromFile; } } diff --git a/packages/lib/services/CommandService.ts b/packages/lib/services/CommandService.ts index 72f7efcf5..0d543bfd2 100644 --- a/packages/lib/services/CommandService.ts +++ b/packages/lib/services/CommandService.ts @@ -228,7 +228,7 @@ export default class CommandService extends BaseService { // Some commands such as "showModalMessage" can be executed many // times per seconds, so we should only display this message in // debug mode. - this.logger().debug('CommandService::execute:', commandName, args); + if (commandName !== 'showModalMessage') this.logger().debug('CommandService::execute:', commandName, args); if (!command.runtime) throw new Error(`Cannot execute a command without a runtime: ${commandName}`); return command.runtime.execute(this.createContext(), ...args); }