Strip duplicate slash on Nextcloud Gpodder sync (#7085)

This commit is contained in:
Tom Hense 2024-04-16 08:14:59 +02:00 committed by GitHub
parent 5e7858ef7e
commit 2f58b4b360
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,8 @@ import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
import okhttp3.RequestBody; import okhttp3.RequestBody;
import okhttp3.Response; import okhttp3.Response;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
@ -148,7 +150,7 @@ public class NextcloudSyncService implements ISyncService {
.scheme(hostname.scheme) .scheme(hostname.scheme)
.host(hostname.host) .host(hostname.host)
.port(hostname.port) .port(hostname.port)
.addPathSegments(hostname.subfolder + path); .addPathSegments(StringUtils.stripStart(hostname.subfolder + path, "/"));
} }
@Override @Override