You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-14 23:26:58 +02:00
All: Fixed filesystem driver bug when downloading resources. Added support for encrypting all items when encryption enabled.
This commit is contained in:
@@ -146,11 +146,17 @@ class FileApiDriverLocal {
|
||||
let output = null;
|
||||
|
||||
try {
|
||||
if (options.encoding == 'binary') {
|
||||
output = fs.readFile(path);
|
||||
if (options.target === 'file') {
|
||||
output = await fs.copy(path, options.path, { overwrite: true });
|
||||
} else {
|
||||
output = fs.readFile(path, options.encoding);
|
||||
output = await fs.readFile(path, options.encoding);
|
||||
}
|
||||
|
||||
// if (options.encoding == 'binary') {
|
||||
// output = await fs.readFile(path);
|
||||
// } else {
|
||||
// output = await fs.readFile(path, options.encoding);
|
||||
// }
|
||||
} catch (error) {
|
||||
if (error.code == 'ENOENT') return null;
|
||||
throw this.fsErrorToJsError_(error);
|
||||
|
||||
Reference in New Issue
Block a user