webdav-fs
webdav-fs copied to clipboard
readdir includes parent path name when not mounted on root
When pairing readdir
with cors-anywhere
, I seem to be getting unexpected results. It's the same behavior as #56 but it only happens when I proxy requests through cors-anywhere
.
I modified the repo in #56 to produce the unexpected results. You can find the reproduction in https://github.com/Cobertos/webdav-fs
npm install
node server_webdav.js &
node client_webdav.js
It seems that this is occurs without cors-anywhere, you just have to mount the webdav server not on the root domain, but on a path of it.
I updated the repro with a server mounted on /somewhere
and it exhibits the same behavior as #56
Thanks for this! Unfortunately I don't have time right now to dig into it, but have you checked if your issue is reproducible on the parent webdav
project?
I'd also happily accept a PR addressing this.
Yes, it does look like it happens with the parent repo. I pushed a commit to use webdav
and .getDirectoryContents()
directly and I see the duplicated entry
I will take a stab at a PR
Made a PR, see https://github.com/perry-mitchell/webdav-client/pull/324 . Turns out it was not where I mounted the webdav server, but just that my calls were not using the leading /
, like all the ones in the webdav-client
repo tests are.