mirror of
https://github.com/laurent22/joplin.git
synced 2025-03-20 20:55:18 +02:00
Desktop, Cli: Resolves #4310: Do not display error message when fixing ENEX resource mime type
This commit is contained in:
parent
c8755839be
commit
c9f40ea23f
@ -528,7 +528,7 @@ function importEnex(parentFolderId, filePath, importOptions = null) {
|
|||||||
if (noteResource.filename) {
|
if (noteResource.filename) {
|
||||||
const mimeTypeFromFile = mime.fromFilename(noteResource.filename);
|
const mimeTypeFromFile = mime.fromFilename(noteResource.filename);
|
||||||
if (mimeTypeFromFile && mimeTypeFromFile !== mimeType) {
|
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;
|
mimeType = mimeTypeFromFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ export default class CommandService extends BaseService {
|
|||||||
// Some commands such as "showModalMessage" can be executed many
|
// Some commands such as "showModalMessage" can be executed many
|
||||||
// times per seconds, so we should only display this message in
|
// times per seconds, so we should only display this message in
|
||||||
// debug mode.
|
// 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}`);
|
if (!command.runtime) throw new Error(`Cannot execute a command without a runtime: ${commandName}`);
|
||||||
return command.runtime.execute(this.createContext(), ...args);
|
return command.runtime.execute(this.createContext(), ...args);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user