Kaydet (Commit) df391dc4 authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS sb26 (1.80.22); FILE MERGED

2004/11/23 16:10:57 sb 1.80.22.1: #i37704# Get rid of unnecessary calls to osl_syncFile.
üst abb342de
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: shell.cxx,v $ * $RCSfile: shell.cxx,v $
* *
* $Revision: 1.81 $ * $Revision: 1.82 $
* *
* last change: $Author: obo $ $Date: 2004-11-17 09:56:50 $ * last change: $Author: rt $ $Date: 2004-11-26 14:42:49 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -1828,6 +1828,13 @@ shell::write( sal_Int32 CommandId, ...@@ -1828,6 +1828,13 @@ shell::write( sal_Int32 CommandId,
const uno::Reference< io::XInputStream >& aInputStream ) const uno::Reference< io::XInputStream >& aInputStream )
throw() throw()
{ {
if( ! aInputStream.is() )
{
installError( CommandId,
TASKHANDLING_INPUTSTREAM_FOR_WRITE );
return sal_False;
}
// Create parent path, if necessary. // Create parent path, if necessary.
if ( ! ensuredir( CommandId, if ( ! ensuredir( CommandId,
getParentName( aUnqPath ), getParentName( aUnqPath ),
...@@ -1881,14 +1888,6 @@ shell::write( sal_Int32 CommandId, ...@@ -1881,14 +1888,6 @@ shell::write( sal_Int32 CommandId,
sal_Bool bSuccess = sal_True; sal_Bool bSuccess = sal_True;
if( ! aInputStream.is() )
{
installError( CommandId,
TASKHANDLING_INPUTSTREAM_FOR_WRITE );
bSuccess = sal_False;
}
else
{
sal_uInt64 nTotalNumberOfBytes = 0; sal_uInt64 nTotalNumberOfBytes = 0;
sal_uInt64 nWrittenBytes; sal_uInt64 nWrittenBytes;
sal_Int32 nReadBytes = 0, nRequestedBytes = 32768 /*32k*/; sal_Int32 nReadBytes = 0, nRequestedBytes = 32768 /*32k*/;
...@@ -1960,7 +1959,7 @@ shell::write( sal_Int32 CommandId, ...@@ -1960,7 +1959,7 @@ shell::write( sal_Int32 CommandId,
bSuccess = sal_False; bSuccess = sal_False;
} }
err = aFile.sync(); err = aFile.close();
if( err != osl::FileBase::E_None ) if( err != osl::FileBase::E_None )
{ {
installError( CommandId, installError( CommandId,
...@@ -1968,9 +1967,6 @@ shell::write( sal_Int32 CommandId, ...@@ -1968,9 +1967,6 @@ shell::write( sal_Int32 CommandId,
err ); err );
bSuccess = sal_False; bSuccess = sal_False;
} }
}
aFile.close();
return bSuccess; return bSuccess;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment