1
0
mirror of https://github.com/owncloud/android-library.git synced 2026-08-11 16:33:03 +00:00

Keep completing the propfind

This commit is contained in:
davigonz
2018-05-22 17:10:32 +02:00
parent a4678557d8
commit 7cb9189fce
3 changed files with 5 additions and 5 deletions
@@ -13,7 +13,7 @@ import okhttp3.Request;
public abstract class RemoteOperation {
private final OCContext mContext;
private static final String WEBDAV_PATH_4_0 = "remote.php/dav";
private static final String WEBDAV_PATH_4_0 = "remote.php/dav/files";
private static OkHttpClient mClient = null;
protected RemoteOperation(OCContext context) {
@@ -50,6 +50,7 @@ public abstract class RemoteOperation {
return UrlUtils.INSTANCE.omitTrailingSlash(HttpUrl.parse(
getBaseUriBuilder()
.appendEncodedPath(WEBDAV_PATH_4_0)
.appendEncodedPath(mContext.getOCAccount().getDisplayName())
.appendEncodedPath(resourcePath)
.build()
.toString()));
@@ -5,7 +5,7 @@ import com.owncloud.android.lib.refactor.RemoteOperation;
import com.owncloud.android.lib.refactor.RemoteOperationResult;
import at.bitfire.dav4android.DavResource;
import at.bitfire.dav4android.property.DisplayName;
import at.bitfire.dav4android.PropertyUtils;
public class PropfindOperation extends RemoteOperation {
@@ -21,9 +21,8 @@ public class PropfindOperation extends RemoteOperation {
public RemoteOperationResult exec() {
try {
DavResource davResource = new DavResource(getClient(), getWebDavHttpUrl("/"));
davResource.propfind(0, DisplayName.NAME);
davResource.propfind(1, PropertyUtils.INSTANCE.getAllPropSet());
} catch (Exception e) {
e.printStackTrace();