1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-20 23:30:05 +02:00

Electron: Resolves #237: Export to PDF and print option

This commit is contained in:
Laurent Cozic
2018-03-12 18:01:47 +00:00
parent dbe1833f92
commit eef106c99b
6 changed files with 104 additions and 12 deletions

View File

@@ -35,7 +35,11 @@ class FsDriverNode extends FsDriverBase {
async writeFile(path, string, encoding = 'base64') {
try {
return await fs.writeFile(path, string, { encoding: encoding });
if (encoding === 'buffer') {
return await fs.writeFile(path, string);
} else {
return await fs.writeFile(path, string, { encoding: encoding });
}
} catch (error) {
throw this.fsErrorToJsError_(error, path);
}