Merge pull request #2129 from joinemm/pr-fix-rstrip

Fix bday conversion hrefs for vCard filenames ending in v/c/f
This commit is contained in:
Peter Bieringer
2026-05-16 13:48:13 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -159,7 +159,7 @@ def xml_propfind_response(
if uri.startswith(share['PathMapped']): if uri.startswith(share['PathMapped']):
uri = str(share['PathOrToken']) + uri.removeprefix(share['PathMapped']) uri = str(share['PathOrToken']) + uri.removeprefix(share['PathMapped'])
if share_bday_automap and uri.endswith(".vcf"): if share_bday_automap and uri.endswith(".vcf"):
uri = uri.rstrip(".vcf") + ".ics" uri = uri.removesuffix(".vcf") + ".ics"
href.text = xmlutils.make_href(base_prefix, uri) href.text = xmlutils.make_href(base_prefix, uri)
response.append(href) response.append(href)

View File

@@ -592,7 +592,7 @@ class Item:
href = self.href href = self.href
if href is not None: if href is not None:
href = href.rstrip(".vcf") + ".ics" href = href.removesuffix(".vcf") + ".ics"
etag = self.etag etag = self.etag
# replace 14 leading chars of etag "<hexdigits>" by special format bda0YYYYMMDD00 # replace 14 leading chars of etag "<hexdigits>" by special format bda0YYYYMMDD00