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

DavResource returned by Sardine.list() does not contain full URI #155

Open
binwiederhier opened this issue Dec 27, 2013 · 0 comments
Open

Comments

@binwiederhier
Copy link
Contributor

Hi there,

Thanks for the great library!

Issue: To the best of my knowledge, there is currently no way to retrieve the full URI (including http://...) of the returned resources by Sardine.list() without fiddling with strings.

Example:

for (DavResource res : sardine.list("http://dav/subfolder1")) {
  System.out.println(res.getHref()); // /subfolder1/somefile.jpg
  System.out.println(res.getPath()); // /subfolder1/somefile.jpg
  System.out.println(res.getName()); // somefile.jpg
  System.out.println(res.getHref().getHost()); // null

  // Desired, but non-existant
  System.out.println(res.getFullPath()); // http://dav/subfolder1/somefile.jpg
}

Workaround:
https://github.com/binwiederhier/syncany/blob/f25e7444064337134f04a23db2dc109dd1c6b6df/syncany-plugins/syncany-plugin-webdav/src/main/java/org/syncany/connection/plugins/webdav/WebdavTransferManager.java#L158

Best
Philipp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant