Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 90475c2e authored by Mario Danic's avatar Mario Danic Committed by AndyScherzinger
Browse files

Try to fix it

parent 9dc57100
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -330,10 +330,22 @@ public class OwnCloudClient extends HttpClient {
    public Uri getWebdavUri() {
    	if (mCredentials instanceof OwnCloudBearerCredentials) {
    		return Uri.parse(mBaseUri + AccountUtils.ODAV_PATH);
    	} else {
    		return Uri.parse(mBaseUri + AccountUtils.WEBDAV_PATH_4_0);
    	}
    }

    public Uri getNewWebdavUri(boolean filesUri) {
        if (mCredentials instanceof OwnCloudBearerCredentials) {
            return Uri.parse(mBaseUri + AccountUtils.ODAV_PATH);
        } else {
            if (filesUri) {
                return Uri.parse(mBaseUri + AccountUtils.WEBDAV_PATH_4_0);
            } else {
                return Uri.parse(mBaseUri + AccountUtils.WEBDAV_PATH_9_0);
            }
        }
    }
    
    /**
     * Sets the root URI to the ownCloud server.   
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ public class SearchOperation extends RemoteOperation {
        SearchMethod searchMethod = null;
        OptionsMethod optionsMethod = null;

        String webDavUrl = client.getWebdavUri().toString();
        String webDavUrl = client.getNewWebdavUri(false).toString();
        optionsMethod = new OptionsMethod(webDavUrl);

        try {