Desktop, Cli: Resolves #4310: Do not display error message when fixing ENEX resource mime type

pull/4306/head
Laurent Cozic 2021-01-08 17:49:53 +00:00
parent c8755839be
commit c9f40ea23f
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -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);
}