mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-31 11:32:00 +00:00
fix regex and brackets for isInstanceInternalFileShareUrl
only links without index.php returned true without this fix. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
5242f9cd2b
commit
9c1f68abb4
@ -22,8 +22,8 @@ class UriUtils {
|
||||
|
||||
fun isInstanceInternalFileShareUrl(baseUrl: String, url: String): Boolean {
|
||||
// https://cloud.nextcloud.com/f/41
|
||||
return url.startsWith("$baseUrl/f/") || url.startsWith("$baseUrl/index.php/f/") &&
|
||||
Regex(".*/f/d*").matches(url)
|
||||
return (url.startsWith("$baseUrl/f/") || url.startsWith("$baseUrl/index.php/f/")) &&
|
||||
Regex(".*/f/\\d*").matches(url)
|
||||
}
|
||||
|
||||
fun extractInstanceInternalFileShareFileId(url: String): String {
|
||||
|
Loading…
Reference in New Issue
Block a user