Fix bday conversion hrefs for vCard filenames ending in v/c/f

This commit is contained in:
Joonas Rautiola
2026-05-16 13:49:25 +03:00
parent def929827c
commit b8977aaa21
2 changed files with 2 additions and 2 deletions

View File

@@ -159,7 +159,7 @@ def xml_propfind_response(
if uri.startswith(share['PathMapped']):
uri = str(share['PathOrToken']) + uri.removeprefix(share['PathMapped'])
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)
response.append(href)

View File

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