diff options
-rw-r--r-- | ucb/source/ucp/webdav-neon/webdavcontent.cxx | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index d86286b16116..e5cd7e4af959 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx @@ -3109,8 +3109,6 @@ void Content::lock( aURL = m_xIdentifier->getContentIdentifier(); } - OUString aTargetUrl = aURL; - try { std::unique_ptr< DAVResourceAccess > xResAccess; @@ -3132,12 +3130,9 @@ void Content::lock( //-1, // infinite lock uno::Sequence< OUString >() ); - // update the URL - aTargetUrl = xResAccess->getURL(); - + // OPTIONS may change as a consequence of the lock operation + aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() ); xResAccess->LOCK( aLock, Environment ); - // OPTIONS may have changed as a consequence of the lock operation - aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl ); { osl::Guard< osl::Mutex > aGuard( m_aMutex ); @@ -3146,7 +3141,6 @@ void Content::lock( } catch ( DAVException const & e ) { - aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl ); // check if the exception thrown is 'already locked' // this exception is mapped directly to the ucb correct one, without // going into the cancelCommandExecution() user interaction @@ -3247,8 +3241,6 @@ void Content::unlock( const uno::Reference< ucb::XCommandEnvironment >& Environment ) throw( uno::Exception, std::exception ) { - // save the URL to clean cache - OUString aTargetUrl = m_xIdentifier->getContentIdentifier(); try { @@ -3258,8 +3250,6 @@ void Content::unlock( xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) ); } - // update the URL - aTargetUrl = xResAccess->getURL(); // check if the target URL is a Class1 DAV DAVOptions aDAVOptions; getResourceOptions( Environment, aDAVOptions, xResAccess ); @@ -3267,10 +3257,10 @@ void Content::unlock( // at least class one is needed if( aDAVOptions.isClass1() ) { - xResAccess->UNLOCK( Environment ); // remove options from cache, unlock may change it // it will be refreshed when needed - aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl ); + aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() ); + xResAccess->UNLOCK( Environment ); } { @@ -3310,9 +3300,6 @@ void Content::unlock( } break; default: - // remove options from cache, - // it will be refreshed when needed - aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl ); //fallthrough ; } |