You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-18 23:07:45 +02:00
Handle sync when resource has been edited
This commit is contained in:
@ -207,6 +207,9 @@ function shimInit() {
|
||||
|
||||
shim.updateResourceBlob = async function(resourceId, newBlobFilePath) {
|
||||
const resource = await Resource.load(resourceId);
|
||||
const readyStatus = await Resource.readyStatus(resourceId);
|
||||
if (readyStatus !== 'ok') throw new Error(`Cannot set resource blob because resource is not ready. Status: ${readyStatus}`);
|
||||
|
||||
const fileStat = await shim.fsDriver().stat(newBlobFilePath);
|
||||
await shim.fsDriver().copy(newBlobFilePath, Resource.fullPath(resource));
|
||||
|
||||
|
Reference in New Issue
Block a user