Merge pull request #7 from club-1/fix-create-calendar-trailing-slash

fix: create calendars with source ending with '/'
This commit is contained in:
JodliDev 2022-04-30 11:07:45 +02:00 committed by GitHub
commit 89cdebc5ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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";