diff options
-rw-r--r-- | ucb/source/ucp/file/prov.cxx | 9 | ||||
-rw-r--r-- | ucb/source/ucp/file/prov.hxx | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 77e7772db7e2..40484c5d9a3c 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -300,9 +300,8 @@ XPropertySetInfoImpl2::hasPropertyByName( } -void FileProvider::initProperties() +void FileProvider::initProperties(std::unique_lock<std::mutex>& /*rGuard*/) { - std::scoped_lock aGuard( m_aMutex ); if( m_xPropertySetInfo.is() ) return; @@ -332,7 +331,8 @@ void FileProvider::initProperties() Reference< XPropertySetInfo > SAL_CALL FileProvider::getPropertySetInfo( ) { - initProperties(); + std::unique_lock aGuard( m_aMutex ); + initProperties(aGuard); return m_xPropertySetInfo; } @@ -352,7 +352,8 @@ Any SAL_CALL FileProvider::getPropertyValue( const OUString& aPropertyName ) { - initProperties(); + std::unique_lock aGuard( m_aMutex ); + initProperties(aGuard); if( aPropertyName == "FileSystemNotation" ) { return Any(m_FileSystemNotation); diff --git a/ucb/source/ucp/file/prov.hxx b/ucb/source/ucp/file/prov.hxx index 311c1be0e469..3d1f9d7f63a0 100644 --- a/ucb/source/ucp/file/prov.hxx +++ b/ucb/source/ucp/file/prov.hxx @@ -143,7 +143,7 @@ namespace fileaccess { // Members css::uno::Reference< css::uno::XComponentContext > m_xContext; - void initProperties(); + void initProperties(std::unique_lock<std::mutex>& rGuard); std::mutex m_aMutex; OUString m_HostName; OUString m_HomeDirectory; |