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" &&