mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Chore: Fix sync issue with Joplin Server when DELTA_INCLUDES_ITEMS is disabled
This commit is contained in:
parent
00eee19077
commit
ebfc5da0fe
@ -827,6 +827,8 @@ export default class Synchronizer {
|
||||
|
||||
const supportsDeltaWithItems = getSupportsDeltaWithItems(listResult);
|
||||
|
||||
logger.info('supportsDeltaWithItems = ', supportsDeltaWithItems);
|
||||
|
||||
const remotes = listResult.items;
|
||||
|
||||
this.logSyncOperation('fetchingTotal', null, null, 'Fetching delta items from sync target', remotes.length);
|
||||
|
@ -50,15 +50,19 @@ export default class FileApiDriverJoplinServer {
|
||||
}
|
||||
|
||||
private metadataToStat_(md: any, path: string, isDeleted = false, rootPath: string) {
|
||||
const output = {
|
||||
const output: any = {
|
||||
path: rootPath ? path.substr(rootPath.length + 1) : path,
|
||||
updated_time: md.updated_time,
|
||||
jop_updated_time: md.jop_updated_time,
|
||||
isDir: false,
|
||||
isDeleted: isDeleted,
|
||||
jopItem: md.jopItem,
|
||||
};
|
||||
|
||||
// Only add this object is it's also present in the raw data. This is
|
||||
// because `getSupportsDeltaWithItems()` relies on it being present or
|
||||
// not to decide if the sync target supports "delta with items".
|
||||
if ('jopItem' in md) output.jopItem = md.jopItem;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user