summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/file/filstr.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-12-17 16:41:36 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-12-17 16:41:36 +0000
commitff79689d1b35bad9f91842a58d1ccd6f38c77b42 (patch)
treefec9770ae5bb0de72b4383c202d10ef44700a8b5 /ucb/source/ucp/file/filstr.cxx
parent4ebd19f1979d1fe245998062f3486105d84f05f2 (diff)
INTEGRATION: CWS geordi2q11 (1.12.54); FILE MERGED
2003/12/15 17:02:14 hr 1.12.54.1: #111934#: join CWS sal06
Diffstat (limited to 'ucb/source/ucp/file/filstr.cxx')
-rw-r--r--ucb/source/ucp/file/filstr.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index 8ad2a4c007..595e12e84f 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -305,8 +305,22 @@ XStream_impl::closeStream(
{
if( m_nIsOpen )
{
- if( osl::FileBase::E_None != m_aFile.close() )
- throw io::IOException();
+ osl::FileBase::RC err = m_aFile.sync();
+ if( err != osl::FileBase::E_None ) {
+ io::IOException ex;
+ ex.Message = rtl::OUString::createFromAscii(
+ "could not synchronize file to disc");
+ throw ex;
+ }
+
+ err = m_aFile.close();
+
+ if( err != osl::FileBase::E_None ) {
+ io::IOException ex;
+ ex.Message = rtl::OUString::createFromAscii(
+ "could not close file");
+ throw ex;
+ }
m_nIsOpen = false;
}