1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

All: Resolves #7661: Stop synchronization with unsupported WebDAV providers (#7819)

This commit is contained in:
Julien
2023-02-22 21:12:53 +08:00
committed by GitHub
parent 219585bbcf
commit 32bb256cca
10 changed files with 112 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ const { FileApi } = require('./file-api.js');
const Synchronizer = require('./Synchronizer').default;
const WebDavApi = require('./WebDavApi');
const { FileApiDriverWebDav } = require('./file-api-driver-webdav');
const checkProviderIsSupported = require('./utils/webDAVUtils').default;
class SyncTargetWebDAV extends BaseSyncTarget {
static id() {
@@ -56,6 +57,7 @@ class SyncTargetWebDAV extends BaseSyncTarget {
};
try {
checkProviderIsSupported(options.path());
const result = await fileApi.stat('');
if (!result) throw new Error(`WebDAV directory not found: ${options.path()}`);
output.ok = true;