1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

All: Allow apps to work with read-only profile

This commit is contained in:
Laurent Cozic 2019-10-14 10:35:04 +02:00
parent 008e30bdb7
commit 0370c7b627

View File

@ -124,7 +124,11 @@ class Logger {
consoleObj[fn](line + this.objectsToString(...object));
} else if (target.type == 'file') {
let serializedObject = this.objectsToString(...object);
Logger.fsDriver().appendFileSync(target.path, `${line + serializedObject}\n`);
try {
Logger.fsDriver().appendFileSync(target.path, `${line + serializedObject}\n`);
} catch (error) {
console.error('Cannot write to log file:', error);
}
} else if (target.type == 'database') {
let msg = this.objectsToString(...object);