diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-08-27 06:51:39 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-08-27 06:51:39 +0000 |
commit | 0e92c8b54ecbf8b23e6b19a34e79c9d1f073bbb7 (patch) | |
tree | 069cd443a9101473de83aaf9ec38a67e4a63c0ec /ucb | |
parent | f4bd5af18f466ddb1057a81560d07acde935cb10 (diff) |
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
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/file/shell.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index c52384ee6ac2..23532578d906 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 ); |