Closed horde3d closed 6 years ago
If a path ends with a slash the parent() method probably does not return what is expected. Example: Path("test/some_path/").parent().path() will return "test/some_path/".
By changing https://github.com/CloudPolis/webdav-client-cpp/blob/3af8c9c7cec55be201c93f6bd4720818db6e7f50/sources/urn.cpp#L140
to auto last_separate_position = m_path.rfind(Path::separate, m_path.length() - 2); it should be ok I guess.
https://github.com/CloudPolis/webdav-client-cpp/blob/3af8c9c7cec55be201c93f6bd4720818db6e7f50/sources/urn.cpp#L47
Thank you for your code review 👍
If a path ends with a slash the parent() method probably does not return what is expected. Example: Path("test/some_path/").parent().path() will return "test/some_path/".
By changing https://github.com/CloudPolis/webdav-client-cpp/blob/3af8c9c7cec55be201c93f6bd4720818db6e7f50/sources/urn.cpp#L140
to auto last_separate_position = m_path.rfind(Path::separate, m_path.length() - 2); it should be ok I guess.