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

Encoding not working for folders with # in the name #91

Closed
nickmisasi opened this issue Mar 28, 2018 · 2 comments
Closed

Encoding not working for folders with # in the name #91

nickmisasi opened this issue Mar 28, 2018 · 2 comments

Comments

@nickmisasi
Copy link

Hi Perry,

I've been tweaking my code since your encoding additions to allow special characters. I believe I've found an issue with the way the encoding was implemented preventing the module from working with a folder with # in the name.

I have a folder called /Product/test #1 and when fetchDirContentByPath('/Product/test #1') is run on this directory, it hits /Products/test%20 which leads me to believe that the encoding isn't working properly.

If I try to encode the path on the way in to this module, resulting in /Products/test%20%231 WebDAV responds with results,
image
but then your getDirectoryFiles function fails to return any results (I get []) back from this output. I've made adjustments here f840c2c that I think will resolve the issue. (ignore the package.json changes, it was for testing, had issues getting it to install by git URL)

@perry-mitchell
Copy link
Owner

Sorry for the delay @nickmisasi13! Thanks for looking in to this.

The encoding issue is proving to be quite a pain. Seems like every change I make ends up revealing yet another hole in the process. I even have a file in the tests with a hash in the filename, but perhaps directories are different.

I don't have time right now to debug and try to fix this, but I'm sure it'd be easy to handle if a test were added for directories with certain characters.

@pschupp01
Copy link

pschupp01 commented Apr 30, 2018

Hey,
I've just posted an issue about the encoding/decoding #93
It is not exactly similar to this one, but is related.

I just want to let you know that the test I posted on the issues 93 are also failing in your branch f840c2c

But for different reasons.

In master:
The directory is correctly retrieved, but the filter doesn't correctly work, and the folder appears in its children list.

In f840c2c:
The directory is not correctly retrieved, the getDirectoryContent match the directory which does not contains the %20(it matches two words instead of two%20words)

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

3 participants