You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-02 22:49:09 +02:00
Merge branch 'master' of github.com:laurent22/joplin
This commit is contained in:
@@ -79,6 +79,8 @@ class FileApiDriverLocal {
|
||||
}
|
||||
|
||||
async delta(path, options) {
|
||||
const itemIds = await options.allItemIdsHandler();
|
||||
|
||||
try {
|
||||
let items = await fs.readdir(path);
|
||||
let output = [];
|
||||
@@ -89,11 +91,11 @@ class FileApiDriverLocal {
|
||||
output.push(stat);
|
||||
}
|
||||
|
||||
if (!Array.isArray(options.itemIds)) throw new Error('Delta API not supported - local IDs must be provided');
|
||||
if (!Array.isArray(itemIds)) throw new Error('Delta API not supported - local IDs must be provided');
|
||||
|
||||
let deletedItems = [];
|
||||
for (let i = 0; i < options.itemIds.length; i++) {
|
||||
const itemId = options.itemIds[i];
|
||||
for (let i = 0; i < itemIds.length; i++) {
|
||||
const itemId = itemIds[i];
|
||||
let found = false;
|
||||
for (let j = 0; j < output.length; j++) {
|
||||
const item = output[j];
|
||||
|
||||
@@ -358,14 +358,15 @@ class Synchronizer {
|
||||
while (true) {
|
||||
if (this.cancelling()) break;
|
||||
|
||||
let allIds = null;
|
||||
if (!this.api().supportsDelta()) {
|
||||
allIds = await BaseItem.syncedItemIds(syncTargetId);
|
||||
}
|
||||
// let allIds = null;
|
||||
// if (!this.api().supportsDelta()) {
|
||||
// allIds = await BaseItem.syncedItemIds(syncTargetId);
|
||||
// }
|
||||
|
||||
let listResult = await this.api().delta('', {
|
||||
context: context,
|
||||
itemIds: allIds,
|
||||
// itemIds: allIds,
|
||||
allItemIdsHandler: async () => { return BaseItem.syncedItemIds(syncTargetId); }
|
||||
});
|
||||
|
||||
let remotes = listResult.items;
|
||||
|
||||
Reference in New Issue
Block a user