ucb/source/ucp/webdav-curl/webdavcontent.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
New commits: commit 928fbadb267be88cc558b55ddb33ec151be6e222 Author: Giuseppe Castagno <[email protected]> AuthorDate: Thu Aug 11 14:19:03 2016 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Mon Nov 1 18:42:12 2021 +0100 ucb: webdav-curl: tdf#101094 (22): Simplify cache removal: MKCOL, PUT [ port of commit 8ff5e67dea29d9ceb100a67a69f6deb4c6f18e13 ] Change-Id: If24272566bfb5fba32b9df9bd0f8e1c7fe18c585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123475 Tested-by: Michael Stahl <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx index 212c8732b91e..876a23b7a930 100644 --- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx @@ -2485,23 +2485,21 @@ void Content::insert( aURL += aEscapedTitle; - // save the URL to clean cache - OUString aTargetUrl = aURL; try { xResAccess->setURL( aURL ); if ( bCollection ) { + aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() ); xResAccess->MKCOL( Environment ); - aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl ); } else { - xResAccess->PUT( xInputStream, Environment ); // remove options from cache, PUT may change it // it will be refreshed when needed - aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl ); + aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() ); + xResAccess->PUT( xInputStream, Environment ); } // no error , set the resourcetype to unknown type // the resource may have transitioned from NOT FOUND or UNKNOWN to something else @@ -2512,7 +2510,6 @@ void Content::insert( } catch ( DAVException const & except ) { - aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl ); if ( bCollection ) { if ( except.getStatus() == SC_METHOD_NOT_ALLOWED )
