1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

All: Handle case where resource blob is missing during sync

This commit is contained in:
Laurent Cozic
2018-01-21 17:01:37 +00:00
parent e355f4e49b
commit 86eee376bb
9 changed files with 47 additions and 19 deletions

View File

@@ -4,14 +4,20 @@ const { GeolocationNode } = require('lib/geolocation-node.js');
const { FileApiDriverLocal } = require('lib/file-api-driver-local.js');
const { time } = require('lib/time-utils.js');
const { setLocale, defaultLocale, closestSupportedLocale } = require('lib/locale.js');
const { FsDriverNode } = require('lib/fs-driver-node.js');
function shimInit() {
shim.fs = fs;
shim.fsDriver = () => { throw new Error('Not implemented') }
shim.FileApiDriverLocal = FileApiDriverLocal;
shim.Geolocation = GeolocationNode;
shim.FormData = require('form-data');
shim.sjclModule = require('lib/vendor/sjcl.js');
shim.fsDriver = () => {
if (!shim.fsDriver_) shim.fsDriver_ = new FsDriverNode();
return shim.fsDriver_;
}
shim.randomBytes = async (count) => {
const buffer = require('crypto').randomBytes(count);
return Array.from(buffer);