summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-08-03 19:42:27 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-11-01 18:41:25 +0100
commita10851aca6e14a00b892c78d1cc51476547acf29 (patch)
tree3218653986579333165c5d6bb3be2196031cd22a
parent944853b03bc5a03ee424354669addb4fa9925fbe (diff)
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>
-rw-r--r--ucb/source/ucp/webdav-curl/webdavcontent.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index de9cd6248a66..46442074d8b2 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 );