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

Commit e77876c0 authored by David Luhmer's avatar David Luhmer
Browse files

make changes as requested

parent 37f5d3ba
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -279,7 +279,12 @@ public class NextcloudRetrofitServiceMethod<T> {
     * in the URI, it will only show up once in the set.
     */
    private Map<String, String> parsePathParameters() {
        Map<String, String> query_pairs = new LinkedHashMap<>();
        Map<String, String> queryPairs = new LinkedHashMap<>();

        if(this.relativeUrl == null) {
            return queryPairs;
        }

        int idxQuery = this.relativeUrl.indexOf("?");
        if (idxQuery != -1 && idxQuery < this.relativeUrl.length() - 1) {
            // Ensure the query string does not have any named parameters.
@@ -296,13 +301,13 @@ public class NextcloudRetrofitServiceMethod<T> {
            String[] pairs = query.split("&");
            for (String pair : pairs) {
                int idx = pair.indexOf("=");
                query_pairs.put(pair.substring(0, idx), pair.substring(idx + 1));
                queryPairs.put(pair.substring(0, idx), pair.substring(idx + 1));
            }

            // Remove query params from url
            this.relativeUrl = this.relativeUrl.substring(0, idxQuery);
        }
        return query_pairs;
        return queryPairs;
    }