diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-12-17 16:41:36 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-12-17 16:41:36 +0000 |
commit | 3428ae0c37b11911ca385e84ed4ed4f39c3b4407 (patch) | |
tree | e0eb6761dd8fb65f238cd1f41ccf1d63230d7939 | |
parent | 84240ea8936dfc8675e737544ff51ac26e40c416 (diff) |
INTEGRATION: CWS geordi2q11 (1.12.54); FILE MERGED
2003/12/15 17:02:14 hr 1.12.54.1: #111934#: join CWS sal06
-rw-r--r-- | ucb/source/ucp/file/filstr.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index 88ae7570ca18..12d82b19cd7e 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; } |