[Libreoffice-commits] core.git: ucb/source
Giuseppe Castagno
giuseppe.castagno at acca-esse.eu
Fri Jul 29 18:31:42 UTC 2016
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
New commits:
commit 2359e5a002f4df58548803320991064e6a6d968c
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date: Wed Jan 27 17:35:36 2016 +0100
tdf#101094 (16) OPTIONS: Options cache removal: MOVE
Change-Id: I7a610003295aa174d655f1e847e6d9a19d84a197
Reviewed-on: https://gerrit.libreoffice.org/27695
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index b00655e..beb5e1c 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1908,14 +1908,18 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
uno::Reference< ucb::XContentIdentifier > xNewId
= new ::ucbhelper::ContentIdentifier( aNewURL );
+ NeonUri sourceURI( xIdentifier->getContentIdentifier() );
+ NeonUri targetURI( xNewId->getContentIdentifier() );
+
try
{
- NeonUri sourceURI( xIdentifier->getContentIdentifier() );
- NeonUri targetURI( xNewId->getContentIdentifier() );
targetURI.SetScheme( sourceURI.GetScheme() );
xResAccess->MOVE(
sourceURI.GetPath(), targetURI.GetURI(), false, xEnv );
+ aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+ aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
+
// @@@ Should check for resources that could not be moved
// (due to source access or target overwrite) and send
// this information through the interaction handler.
@@ -1949,6 +1953,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
catch ( DAVException const & e )
{
+ aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+ aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
// Do not set new title!
aNewTitle.clear();
@@ -2578,11 +2584,12 @@ void Content::transfer(
xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
}
+ NeonUri sourceURI( rArgs.SourceURL );
+ NeonUri targetURI( xIdentifier->getContentIdentifier() );
+
OUString aTargetURI;
try
{
- NeonUri sourceURI( rArgs.SourceURL );
- NeonUri targetURI( xIdentifier->getContentIdentifier() );
aTargetURI = targetURI.GetPathBaseNameUnescaped();
// Check source's and target's URL scheme
@@ -2703,6 +2710,8 @@ void Content::transfer(
rArgs.NameClash
== ucb::NameClash::OVERWRITE,
Environment );
+ aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+ aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
if ( xSource.is() )
{
@@ -2749,10 +2758,14 @@ 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
More information about the Libreoffice-commits
mailing list