You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when directory name is included in base url, getDirectoryContents will return wrong result.
for example I have requested base url http://.../storage/test1 and request to list /te directory
in my server it is an empty directory, so empty array is expected, but got ['/test1/te']
in parse.js processDirectoryResultFilename
varpos=resultFilename.indexOf(dirPath);
I think bug is here. '/storage/test1/te'.indexOf('/te') will got 8, which expected 14.
maybe we should save base url when creating client, or... does lastIndexOf() works?
The text was updated successfully, but these errors were encountered:
seems we have to store base url from create client
if I request directory /, base url is /storage/test1, and there is one test2 directory inner test1
server will response 2 item /storage/test1/, /storage/test1/test2/
simple string analysis could never tell apart which is base href and which is directory.
After looking at the code, this looks like a deeper architectural issue.. I haven't considered webdav servers and subdirectory hosting. If the server is hosted on a sub directory then these pathing issues can be found easily. Need to consider what the best way forward is..
EDIT: Looks like I'll undertake a more major refactoring. There's just too much wrong and unclear with the current codebase. I've already got a new getDirectoryContents method rewritten from scratch. After I've got the API fully re-implemented with new unit tests, I'll consider submitting a new RC.
when directory name is included in base url, getDirectoryContents will return wrong result.
for example I have requested base url
http://.../storage/test1
and request to list/te
directoryin my server it is an empty directory, so empty array is expected, but got
['/test1/te']
in
parse.js
processDirectoryResultFilenameI think bug is here.
'/storage/test1/te'.indexOf('/te')
will got 8, which expected 14.maybe we should save base url when creating client, or... does lastIndexOf() works?
The text was updated successfully, but these errors were encountered: