From 0e84caaa4e445e26ac4b1d9ae9b33242fe93215f Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Thu, 28 Apr 2022 20:10:16 +0200 Subject: [PATCH] fix: create calendars with source ending with '/' by trimming the trailing slash if it exists --- drivers/caldav/caldav_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/caldav/caldav_driver.php b/drivers/caldav/caldav_driver.php index 6ebf666..f30763f 100644 --- a/drivers/caldav/caldav_driver.php +++ b/drivers/caldav/caldav_driver.php @@ -240,7 +240,7 @@ class caldav_driver extends calendar_driver $source['caldav_pass'] = $this->_decrypt_pass($source['caldav_pass']); $server_url = self::_encode_url($source['caldav_url']); - $server_path = parse_url($server_url, PHP_URL_PATH); + $server_path = rtrim(parse_url($server_url, PHP_URL_PATH), '/'); $calId = $this->cal->generate_uid(); $path = "/calendars/$source[caldav_user]/$calId";