mirror of https://github.com/laurent22/joplin.git
Desktop, Cli: Resolves #4310: Do not display error message when fixing ENEX resource mime type
parent
c8755839be
commit
c9f40ea23f
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue