summaryrefslogtreecommitdiff
path: root/ucb/source
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-08-14 13:18:44 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-11-01 18:43:01 +0100
commit57777bce551ffe4cf1292e05ec3fe7f8c92adb38 (patch)
tree77647797d06014173b0e054c38be7eab6814698b /ucb/source
parent0e9cea7ccdac443a51c81ce6ec3e1115a09b00be (diff)
ucb: webdav-curl: tdf#101094 (23): Simplify cache removal: MOVE, COPY
[ port of commit 63af1c52c534840d1f55e3041351d24b85edcaa4 plus move Uris back into try block ] Change-Id: I8cc7f6e14fcac294531b5be8fdbaf78610a3adfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123477 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'ucb/source')
-rw-r--r--ucb/source/ucp/webdav-curl/webdavcontent.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 5b1fbd5635e7..8917b749a537 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -2184,7 +2184,7 @@ uno::Any Content::open(
ucb::IOErrorCode_NOT_EXISTING,
aArgs ) ),
xEnv );
- // Unreachable
+ // Unreachable
}
}
catch ( DAVException const & e )
@@ -2640,12 +2640,12 @@ void Content::transfer(
xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
}
- CurlUri sourceURI( rArgs.SourceURL );
- CurlUri targetURI( xIdentifier->getContentIdentifier() );
-
OUString aTargetURI;
try
{
+ CurlUri sourceURI( rArgs.SourceURL );
+ CurlUri targetURI( xIdentifier->getContentIdentifier() );
+
aTargetURI = targetURI.GetPathBaseNameUnescaped();
// Check source's and target's URL scheme
@@ -2765,13 +2765,13 @@ void Content::transfer(
// destination resource. If the Overwrite header is set to
// "F" then the operation will fail.
+ aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+ aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
aSourceAccess.MOVE( sourceURI.GetPath(),
targetURI.GetURI(),
rArgs.NameClash
== ucb::NameClash::OVERWRITE,
Environment );
- aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
- aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
if ( xSource.is() )
{
@@ -2794,13 +2794,13 @@ void Content::transfer(
// destination resource. If the Overwrite header is set to
// "F" then the operation will fail.
+ aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+ aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
aSourceAccess.COPY( sourceURI.GetPath(),
targetURI.GetURI(),
rArgs.NameClash
== ucb::NameClash::OVERWRITE,
Environment );
- aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
- aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
// DAV resources store all additional props on server!
// // Copy own and all children's Additional Core Properties.
@@ -2820,14 +2820,10 @@ void Content::transfer(
}
catch ( ucb::IllegalIdentifierException const & )
{
- aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
- aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
// queryContent
}
catch ( DAVException const & e )
{
- aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
- aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
// [RFC 2518] - WebDAV
// 412 (Precondition Failed) - The server was unable to maintain
// the liveness of the properties listed in the propertybehavior