Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readdir gives unexpected results #56

Closed
mickael-kerjean opened this issue Mar 25, 2018 · 3 comments
Closed

readdir gives unexpected results #56

mickael-kerjean opened this issue Mar 25, 2018 · 3 comments

Comments

@mickael-kerjean
Copy link

Let's say, my folder structure is the following:

test
  | test.txt

This code:

var wfs = require("webdav-fs")("http://127.0.0.1:8000");
wfs.readdir("/test/", function(err, c){
    console.log(c);
});

prints: ["test", "test.txt"] but I would have expect it to print ["test.txt"].

I've made up a repo on which you can test this: https://github.com/mickael-kerjean/webdav-fs:

npm install
node server_webdav.js &
node client_webdav.js

[ 'level1', 'level2' ]

The weird thing is it use to work correctly:

npm install --save webdav-fs@v1.5.0
node client_webdav.js

[ 'level2' ]

@perry-mitchell
Copy link
Owner

Thanks for posting @mickael-kerjean - It seems that this issue is reproducible in webdav as well, the root package. It looks that if I use /level1 instead of /level1/ (no trailing slash), it works correctly. Something to do with the filtering I guess.

@perry-mitchell
Copy link
Owner

perry-mitchell commented Mar 25, 2018

Oh and thanks for the reproduction repo! It's a big help.

@perry-mitchell
Copy link
Owner

Released in v1.10.1. Thanks @mickael-kerjean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants