summaryrefslogtreecommitdiff
path: root/transex3/source/export2.cxx
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-01-27 16:26:13 +0100
committerIvo Hinkelmann <ihi@openoffice.org>2010-01-27 16:26:13 +0100
commitda5fdc46b8d8aa2a32bb0ccdbc768b7e96ba273f (patch)
treef8395e5d4ae3e81956e263bdb0cf871cc9151901 /transex3/source/export2.cxx
parenta416c056cd80eb77339017d28354c9b4fd1ff358 (diff)
parentb38be2caf83f44538f213d1c01420aee67bebce3 (diff)
CWS-TOOLING: integrate CWS cmcfixes69
Diffstat (limited to 'transex3/source/export2.cxx')
-rw-r--r--transex3/source/export2.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/transex3/source/export2.cxx b/transex3/source/export2.cxx
index 7815e80e033f..bf2648b0ca4f 100644
--- a/transex3/source/export2.cxx
+++ b/transex3/source/export2.cxx
@@ -354,17 +354,18 @@ bool Export::CopyFile( const ByteString& source , const ByteString& dest )
const int BUFFERSIZE = 8192;
char buf[ BUFFERSIZE ];
- FILE* IN_FILE = fopen( source.GetBuffer() , "r" );
- FILE* OUT_FILE = fopen( dest.GetBuffer() , "w" );
-
+ FILE* IN_FILE = fopen( source.GetBuffer() , "r" );
if( IN_FILE == NULL )
{
cerr << "Export::CopyFile WARNING: Could not open " << source.GetBuffer() << "\n";
return false;
}
+
+ FILE* OUT_FILE = fopen( dest.GetBuffer() , "w" );
if( OUT_FILE == NULL )
{
cerr << "Export::CopyFile WARNING: Could not open/create " << dest.GetBuffer() << " for writing\n";
+ fclose( IN_FILE );
return false;
}