From be4a2d3271186ed82baa6ac463cd22cf02ef8b58 Mon Sep 17 00:00:00 2001 From: fyears <1142836+fyears@users.noreply.github.com> Date: Sat, 25 May 2024 15:57:48 +0800 Subject: [PATCH] nextcloud address --- src/fsWebdav.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/fsWebdav.ts b/src/fsWebdav.ts index 8b856b2..84d07ef 100644 --- a/src/fsWebdav.ts +++ b/src/fsWebdav.ts @@ -324,8 +324,17 @@ export class FakeFsWebdav extends FakeFs { await this._checkPartialSupport(); } + /** + * /remote.php/dav/files/ + * => /remote.php/dav/uploads/ + */ _getnextcloudUploadServerAddress = () => { - const s = this.webdavConfig.address.split("/"); + let k = this.webdavConfig.address; + if (k.endsWith('/')) { + // no tailing slash + k = k.substring(0, k.length-1); + } + const s = k.split("/"); if ( s.length > 3 && s[s.length - 3] === "dav" &&