F-Droid repo URL matching made more general (#188)

This commit is contained in:
Imran Remtulla
2022-12-22 08:01:26 -05:00
parent 45a23e9025
commit 4e0c655538
2 changed files with 3 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ class FDroidRepo extends AppSource {
@override
String standardizeURL(String url) {
RegExp standardUrlRegExp =
RegExp('^https?://.+/fdroid/(repo(/|\\?)|repo\$)');
RegExp('^https?://.+/fdroid/([^/]+(/|\\?)|[^/]+\$)');
RegExpMatch? match = standardUrlRegExp.firstMatch(url.toLowerCase());
if (match == null) {
throw InvalidURLError(name);