From 5b33638e202e8320f4b95b85ff34938029cf8920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 19 Feb 2024 16:38:51 +0100 Subject: [PATCH] autoupdater: Fix double slash in gitlab and gitea forges --- autoupdate_app_sources/rest_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoupdate_app_sources/rest_api.py b/autoupdate_app_sources/rest_api.py index 6cf6d43..bf3f0c1 100644 --- a/autoupdate_app_sources/rest_api.py +++ b/autoupdate_app_sources/rest_api.py @@ -53,7 +53,7 @@ class GithubAPI: class GitlabAPI: def __init__(self, upstream: str): # Find gitlab api root... - self.forge_root = self.get_forge_root(upstream) + self.forge_root = self.get_forge_root(upstream).rstrip("/") self.project_path = upstream.replace(self.forge_root, "").lstrip("/") self.project_id = self.find_project_id(self.project_path) @@ -128,7 +128,7 @@ class GitlabAPI: class GiteaForgejoAPI: def __init__(self, upstream: str): # Find gitea/forgejo api root... - self.forge_root = self.get_forge_root(upstream) + self.forge_root = self.get_forge_root(upstream).rstrip("/") self.project_path = upstream.replace(self.forge_root, "").lstrip("/") def get_forge_root(self, project_url: str) -> str: