WebDAV::exists() should add a trailing slash for checking dirs
Without it, some WebDAV servers will thrown an error.
This commit is contained in:
parent
a6fd64eacd
commit
871f2065c4
|
@ -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 {
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue