ucb: webdav-curl: tdf#101094 (20) OPTIONS: Check for Class1 DAV before unlock
[ port of commit d14977d33bc3edb6a2c41db4d685d099bfe8d51e ]
Change-Id: I559d71f49e582af50ef88ea42beba48d38180134
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123473
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index de9cd62..4644207 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -3266,10 +3266,18 @@ void Content::unlock(
// update the URL
aTargetUrl = xResAccess->getURL();
xResAccess->UNLOCK( Environment );
// remove options from cache, unlock may change it
// it will be refreshed when needed
aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
// check if the target URL is a Class1 DAV
DAVOptions aDAVOptions;
getResourceOptions( Environment, aDAVOptions, xResAccess );
// at least class one is needed
if( aDAVOptions.isClass1() )
{
xResAccess->UNLOCK( Environment );
// remove options from cache, unlock may change it
// it will be refreshed when needed
aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
}
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );