You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-21 23:17:42 +02:00
@ -217,7 +217,9 @@ class FileApiDriverOneDrive {
|
||||
};
|
||||
|
||||
const freshStartDelta = () => {
|
||||
const url = `${this.makePath_(path)}:/delta`;
|
||||
// Business Accounts are only allowed to make delta requests to the root. For some reason /delta gives an error for personal accounts and :/delta an error for business accounts
|
||||
const accountProperties = this.api_.accountProperties_;
|
||||
const url = (accountProperties.accountType === 'business') ? `/drives/${accountProperties.driveId}/root/delta` : `${this.makePath_(path)}:/delta`;
|
||||
const query = this.itemFilter_();
|
||||
query.select += ',deleted';
|
||||
return { url: url, query: query };
|
||||
@ -265,14 +267,14 @@ class FileApiDriverOneDrive {
|
||||
|
||||
const items = [];
|
||||
|
||||
// The delta API might return things that happen in subdirectories of the root and we don't want to
|
||||
// deal with these since all the files we're interested in are at the root (The .resource dir
|
||||
// is special since it's managed directly by the clients and resources never change - only the
|
||||
// associated .md file at the root is synced). So in the loop below we check that the parent is
|
||||
// indeed the root, otherwise the item is skipped.
|
||||
// (Not sure but it's possible the delta API also returns events for files that are copied outside
|
||||
// of the app directory and later deleted or modified. We also don't want to deal with
|
||||
// these files during sync).
|
||||
// The delta API might return things that happens in subdirectories and outside of the joplin directory.
|
||||
// We don't want to deal with these since all the files we're interested in are at the root of the joplin directory
|
||||
// (The .resource dir is special since it's managed directly by the clients and resources never change - only the
|
||||
// associated .md file at the root is synced). So in the loop below we check that the parent is indeed the joplin
|
||||
// directory, otherwise the item is skipped.
|
||||
// At OneDrive for Business delta requests can only make at the root of OneDrive. Not sure but it's possible that
|
||||
// the delta API also returns events for files that are copied outside of the app directory and later deleted or
|
||||
// modified when using OneDrive Personal).
|
||||
|
||||
for (let i = 0; i < response.value.length; i++) {
|
||||
const v = response.value[i];
|
||||
|
Reference in New Issue
Block a user