From e6cd9608cd609a85a8fe7c0592a8c797b142afb8 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Wed, 27 Aug 2008 06:51:39 +0000 Subject: INTEGRATION: CWS mav37_DEV300 (1.97.22); FILE MERGED 2008/08/14 11:21:11 mav 1.97.22.1: #i92735# do not lock file while inserting with no removing --- ucb/source/ucp/file/shell.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ucb/source') diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index cf0115ec66..293f2c571d 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: shell.cxx,v $ - * $Revision: 1.97 $ + * $Revision: 1.98 $ * * This file is part of OpenOffice.org. * @@ -1810,7 +1810,7 @@ shell::write( sal_Int32 CommandId, } else { - err = aFile.open( OpenFlag_Write ); + err = aFile.open( OpenFlag_Read | OpenFlag_NoLock ); if( err == osl::FileBase::E_None ) // The file exists and shall not be overwritten { installError( CommandId, @@ -1821,10 +1821,13 @@ shell::write( sal_Int32 CommandId, return sal_False; } - err = aFile.open( OpenFlag_Write | OpenFlag_Create ); + // as a temporary solution the creation does not lock the file at all + // in future it should be possible to create the file without lock explicitly + err = aFile.open( OpenFlag_Write | OpenFlag_Create | OpenFlag_NoLock ); if( err != osl::FileBase::E_None ) { + aFile.close(); installError( CommandId, TASKHANDLING_NO_OPEN_FILE_FOR_WRITE, err ); -- cgit v1.2.3