From 351682cc7f5d91c1c6d21d7a8debd541d7c45674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abel=20Garci=CC=81a=20de=20Prada?= Date: Fri, 21 May 2021 13:16:04 +0200 Subject: [PATCH] Use userId instead of username to build the webdavurl --- .../android/lib/common/accounts/AccountUtils.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/accounts/AccountUtils.java b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/accounts/AccountUtils.java index 32e062ae..9db87f4b 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/accounts/AccountUtils.java +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/accounts/AccountUtils.java @@ -52,17 +52,9 @@ public class AccountUtils { */ public static String getWebDavUrlForAccount(Context context, Account account) throws AccountNotFoundException { - String webDavUrlForAccount = ""; - try { - OwnCloudCredentials ownCloudCredentials = getCredentialsForAccount(context, account); - webDavUrlForAccount = getBaseUrlForAccount(context, account) + OwnCloudClient.WEBDAV_FILES_PATH_4_0 - + ownCloudCredentials.getUsername(); - } catch (OperationCanceledException | AuthenticatorException | IOException e) { - Timber.e(e); - } - - return webDavUrlForAccount; + return getBaseUrlForAccount(context, account) + OwnCloudClient.WEBDAV_FILES_PATH_4_0 + + AccountUtils.getUserId(account, context); } /**