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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user