1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

All: Add support for share permissions (#8491)

This commit is contained in:
Laurent Cozic
2023-07-16 17:42:42 +01:00
committed by GitHub
parent b5193e1174
commit 77482a0c95
90 changed files with 1367 additions and 360 deletions

View File

@@ -3,6 +3,7 @@ const { basicDelta } = require('./file-api');
const { dirname, basename } = require('./path-utils');
const shim = require('./shim').default;
const Buffer = require('buffer').Buffer;
const { ltrimSlashes } = require('./path-utils');
class FileApiDriverOneDrive {
constructor(api) {
@@ -196,11 +197,12 @@ class FileApiDriverOneDrive {
async clearRoot() {
const recurseItems = async (path) => {
path = ltrimSlashes(path);
const result = await this.list(this.fileApi_.fullPath(path));
const output = [];
for (const item of result.items) {
const fullPath = `${path}/${item.path}`;
const fullPath = ltrimSlashes(`${path}/${item.path}`);
if (item.isDir) {
await recurseItems(fullPath);
}