diff options
Diffstat (limited to 'ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx')
-rw-r--r-- | ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx index 436f26dd93cf..97205dd14a81 100644 --- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx @@ -1018,40 +1018,40 @@ void DAVResourceAccess::setURL( const OUString & rNewURL ) void DAVResourceAccess::initialize() { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - if ( m_aPath.isEmpty() ) - { - NeonUri aURI( m_aURL ); - const OUString& aPath( aURI.GetPath() ); + if ( !m_aPath.isEmpty() ) + return; - /* #134089# - Check URI */ - if ( aPath.isEmpty() ) - throw DAVException( DAVException::DAV_INVALID_ARG ); + NeonUri aURI( m_aURL ); + const OUString& aPath( aURI.GetPath() ); - /* #134089# - Check URI */ - if ( aURI.GetHost().isEmpty() ) - throw DAVException( DAVException::DAV_INVALID_ARG ); + /* #134089# - Check URI */ + if ( aPath.isEmpty() ) + throw DAVException( DAVException::DAV_INVALID_ARG ); - if ( !m_xSession.is() || !m_xSession->CanUse( m_aURL, m_aFlags ) ) - { - m_xSession.clear(); + /* #134089# - Check URI */ + if ( aURI.GetHost().isEmpty() ) + throw DAVException( DAVException::DAV_INVALID_ARG ); - // create new webdav session - m_xSession - = m_xSessionFactory->createDAVSession( m_aURL, m_aFlags, m_xContext ); + if ( !m_xSession.is() || !m_xSession->CanUse( m_aURL, m_aFlags ) ) + { + m_xSession.clear(); - if ( !m_xSession.is() ) - return; - } + // create new webdav session + m_xSession + = m_xSessionFactory->createDAVSession( m_aURL, m_aFlags, m_xContext ); - // Own URI is needed to redirect cycle detection. - m_aRedirectURIs.push_back( aURI ); + if ( !m_xSession.is() ) + return; + } - // Success. - m_aPath = aPath; + // Own URI is needed to redirect cycle detection. + m_aRedirectURIs.push_back( aURI ); - // Not only the path has to be encoded - m_aURL = aURI.GetURI(); - } + // Success. + m_aPath = aPath; + + // Not only the path has to be encoded + m_aURL = aURI.GetURI(); } |