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

Probably unwanted behavior when cleaning path #48

Closed horde3d closed 6 years ago

horde3d commented 6 years ago

What's the intention for the code here: https://github.com/CloudPolis/webdav-client-cpp/blob/d1bbbf939b39cb7f17acaefe5e0ccce658325faa/sources/client.cpp#L453

If target_path = /test/example/, target_path_without_sep will be equal to target_path. If target_path = /test/example, target_path_without_sep will be /test/. But I guess the intention was:

auto target_path_without_sep = target_urn.path();
if( !target_path_without_sep.empty() && target_path_without_sep.back() == '/' )
     target_path_without_sep.resize(target_path_without_sep.length() - 1);
rusdevops commented 6 years ago

I grant you access to this repository (for create new branches).

horde3d commented 6 years ago

Thanks, but I probably won't do much with the library in the future. Just need it for a quick and dirty demo application.