CloudPolis / webdav-client-cpp

:cloud: C++ WebDAV Client provides easy and convenient to work with WebDAV-servers.
http://cloudpolis.github.io/webdav-client-cpp/
Other
120 stars 52 forks source link

resource_pah and target_path differs in ::info when URL has subdirectory #18

Closed telkamp closed 6 years ago

telkamp commented 6 years ago

I'm using an URL with a subdirectory as webdav_hostname (http://mynas.../temp) There is a check in the ::info method (client.cpp:515) verifying that resource_path and target_path are equal: if (resource_path_without_sep.compare(target_path_without_sep) == 0) { They differ in my case: target_path_without_sep: /empty_directory/ resource_path_without_sep: /temp/empty_directory/ Hence ::info returns an empty dict_t.

rusdevops commented 6 years ago

@telkamp, Thanks for the comment, soon we will solve this issue.

rusdevops commented 6 years ago

Try to use webdav_root option as show below:

std::map<std::string, std::string> options =
{
    {"webdav_hostname", "http://mynas..."},
    {"webdav_root", "temp"}
    {"webdav_login",    "..."},
    {"webdav_password", "..."}
};
telkamp commented 6 years ago

Thank you for yout hint! It works now for me.