summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-08-11 14:19:03 +0200
committerGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-08-11 15:06:15 +0000
commit8ff5e67dea29d9ceb100a67a69f6deb4c6f18e13 (patch)
tree99bc84fb5803037f7d97eb781010e87c705a2970
parent508f78298833f45fd9e2e789aa26cca125719baf (diff)
tdf#101094 (22): Simplify cache removal: MKCOL, PUT
Change-Id: Id2c9f87e408b6754e17ef3792691d848deabfcd5 Reviewed-on: https://gerrit.libreoffice.org/28056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index e5cd7e4af959..ca4531d402cb 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -2472,23 +2472,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
@@ -2499,7 +2497,6 @@ void Content::insert(
}
catch ( DAVException const & except )
{
- aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
if ( bCollection )
{
if ( except.getStatus() == SC_METHOD_NOT_ALLOWED )