diff --git a/code/utils/WebDAV.php b/code/utils/WebDAV.php index 98cff3c..268787d 100644 --- a/code/utils/WebDAV.php +++ b/code/utils/WebDAV.php @@ -13,6 +13,11 @@ class WebDAV { } static function exists($url) { + // WebDAV expects that checking a directory exists has a trailing slash + if (substr($url, -1) != '/') { + $url .= '/'; + } + $ch = self::curl_init($url, 'PROPFIND'); $res = curl_exec($ch); @@ -60,4 +65,4 @@ class WebDAV { } -} \ No newline at end of file +}