From b8977aaa21a0a4d0e7160cb7117fb8167b663a0a Mon Sep 17 00:00:00 2001 From: Joonas Rautiola Date: Sat, 16 May 2026 13:49:25 +0300 Subject: [PATCH] Fix bday conversion hrefs for vCard filenames ending in v/c/f --- radicale/app/propfind.py | 2 +- radicale/item/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/radicale/app/propfind.py b/radicale/app/propfind.py index f366f956..4ba26020 100644 --- a/radicale/app/propfind.py +++ b/radicale/app/propfind.py @@ -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) diff --git a/radicale/item/__init__.py b/radicale/item/__init__.py index edbe008d..a3fea54f 100644 --- a/radicale/item/__init__.py +++ b/radicale/item/__init__.py @@ -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 "" by special format bda0YYYYMMDD00