Loading src/com/owncloud/android/lib/common/utils/WebDavFileUtils.java +3 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class WebDavFileUtils { OwnCloudClient client, boolean isReadFolderOperation, boolean isSearchOperation, String username) { String userId) { ArrayList<Object> mFolderAndFiles = new ArrayList<>(); WebdavEntry we; Loading @@ -61,8 +61,8 @@ public class WebDavFileUtils { } String stripString = client.getWebdavUri().getPath(); if (isSearchOperation && username != null) { stripString = stripString.substring(0, stripString.lastIndexOf("/")) + "/dav/files/" + username; if (isSearchOperation && userId != null) { stripString = stripString.substring(0, stripString.lastIndexOf("/")) + "/dav/files/" + userId; stripString = stripString.replaceAll(" ", "%20"); } Loading src/com/owncloud/android/lib/resources/files/SearchOperation.java +5 −3 Original line number Diff line number Diff line Loading @@ -65,13 +65,15 @@ public class SearchOperation extends RemoteOperation { } private String searchQuery; private String userId; private SearchType searchType; private boolean filterOutFiles; public SearchOperation(String query, SearchType searchType, boolean filterOutFiles) { public SearchOperation(String query, SearchType searchType, boolean filterOutFiles, String userId) { this.searchQuery = query; this.searchType = searchType; this.filterOutFiles = filterOutFiles; this.userId = userId; } @Override Loading Loading @@ -100,7 +102,7 @@ public class SearchOperation extends RemoteOperation { MultiStatus dataInServer = searchMethod.getResponseBodyAsMultiStatus(); WebDavFileUtils webDavFileUtils = new WebDavFileUtils(); ArrayList<Object> mFolderAndFiles = webDavFileUtils.readData(dataInServer, client, false, true, client.getCredentials().getUsername()); userId); // Result of the operation result = new RemoteOperationResult(true, status, searchMethod.getResponseHeaders()); Loading Loading @@ -204,7 +206,7 @@ public class SearchOperation extends RemoteOperation { Element scopeElement = query.createElementNS(DAV_NAMESPACE, "d:scope"); Element hrefElement = query.createElementNS(DAV_NAMESPACE, "d:href"); Element depthElement = query.createElementNS(DAV_NAMESPACE, "d:depth"); Text hrefTextElement = query.createTextNode("/files/" + getClient().getCredentials().getUsername()); Text hrefTextElement = query.createTextNode("/files/" + userId); Text depthTextElement = query.createTextNode("infinity"); Element whereElement = query.createElementNS(DAV_NAMESPACE, "d:where"); Element folderElement = null; Loading Loading
src/com/owncloud/android/lib/common/utils/WebDavFileUtils.java +3 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class WebDavFileUtils { OwnCloudClient client, boolean isReadFolderOperation, boolean isSearchOperation, String username) { String userId) { ArrayList<Object> mFolderAndFiles = new ArrayList<>(); WebdavEntry we; Loading @@ -61,8 +61,8 @@ public class WebDavFileUtils { } String stripString = client.getWebdavUri().getPath(); if (isSearchOperation && username != null) { stripString = stripString.substring(0, stripString.lastIndexOf("/")) + "/dav/files/" + username; if (isSearchOperation && userId != null) { stripString = stripString.substring(0, stripString.lastIndexOf("/")) + "/dav/files/" + userId; stripString = stripString.replaceAll(" ", "%20"); } Loading
src/com/owncloud/android/lib/resources/files/SearchOperation.java +5 −3 Original line number Diff line number Diff line Loading @@ -65,13 +65,15 @@ public class SearchOperation extends RemoteOperation { } private String searchQuery; private String userId; private SearchType searchType; private boolean filterOutFiles; public SearchOperation(String query, SearchType searchType, boolean filterOutFiles) { public SearchOperation(String query, SearchType searchType, boolean filterOutFiles, String userId) { this.searchQuery = query; this.searchType = searchType; this.filterOutFiles = filterOutFiles; this.userId = userId; } @Override Loading Loading @@ -100,7 +102,7 @@ public class SearchOperation extends RemoteOperation { MultiStatus dataInServer = searchMethod.getResponseBodyAsMultiStatus(); WebDavFileUtils webDavFileUtils = new WebDavFileUtils(); ArrayList<Object> mFolderAndFiles = webDavFileUtils.readData(dataInServer, client, false, true, client.getCredentials().getUsername()); userId); // Result of the operation result = new RemoteOperationResult(true, status, searchMethod.getResponseHeaders()); Loading Loading @@ -204,7 +206,7 @@ public class SearchOperation extends RemoteOperation { Element scopeElement = query.createElementNS(DAV_NAMESPACE, "d:scope"); Element hrefElement = query.createElementNS(DAV_NAMESPACE, "d:href"); Element depthElement = query.createElementNS(DAV_NAMESPACE, "d:depth"); Text hrefTextElement = query.createTextNode("/files/" + getClient().getCredentials().getUsername()); Text hrefTextElement = query.createTextNode("/files/" + userId); Text depthTextElement = query.createTextNode("infinity"); Element whereElement = query.createElementNS(DAV_NAMESPACE, "d:where"); Element folderElement = null; Loading