summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-01-27 17:35:36 +0100
committerGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-07-29 18:31:01 +0000
commit2359e5a002f4df58548803320991064e6a6d968c (patch)
tree6c1fb09b5472fa82f10c7ada871da9d74db9b2bf
parent1596379bc00a32bc3b4e76a53aa884112b21764b (diff)
tdf#101094 (16) OPTIONS: Options cache removal: MOVE
Change-Id: I7a610003295aa174d655f1e847e6d9a19d84a197 Reviewed-on: https://gerrit.libreoffice.org/27695 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index b00655efdf94..beb5e1c13bf3 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