diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-01-13 18:17:16 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-01-13 18:17:16 +0000 |
commit | d7bf5581322b5966961ad1cebc40737c583b8b75 (patch) | |
tree | 3810a87a82aa222244aed2a09fc9fdad709abb41 /transex3 | |
parent | 736a7b13eaac542e12416c4874190b1fbf12ad16 (diff) |
INTEGRATION: CWS babelfish (1.3.4); FILE MERGED
2004/12/01 18:18:05 ihi 1.3.4.2: RESYNC: (1.3-1.4); FILE MERGED
2004/11/19 20:16:46 ihi 1.3.4.1: #i36953# dmake helpex multiprocessing
Diffstat (limited to 'transex3')
-rw-r--r-- | transex3/source/helpmerge.cxx | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/transex3/source/helpmerge.cxx b/transex3/source/helpmerge.cxx index 6c9243989c34..b6a1b80d500b 100644 --- a/transex3/source/helpmerge.cxx +++ b/transex3/source/helpmerge.cxx @@ -2,9 +2,9 @@ * * $RCSfile: helpmerge.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: rt $ $Date: 2004-11-18 08:17:02 $ + * last change: $Author: kz $ $Date: 2005-01-13 19:17:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,6 +64,9 @@ #include "helpmerge.hxx" #include "utf8conv.hxx" #include <algorithm> +#include <sys/types.h> +#include <sys/stat.h> + /*****************************************************************************/ void HelpParser::FillInFallbacks( LangHashMap& rElem_out, //int nLangIdx_in ){ ByteString sLangIdx_in ){ @@ -372,6 +375,17 @@ bool HelpParser::Merge( ByteString sCur; for( long int n = 0; n < aLanguages.size(); n++ ){ sCur = aLanguages[ n ]; + + ByteString testpath; + if( bISO ){ + testpath = GetOutpath( rPathX , sCur , rPathY ); + // MakeDir( testpath ); + } + else testpath = rPathX; + // Test + MakeDir( testpath ); + // Test + XMLFile* pFile = new XMLFile( *xmlfile );// copy new() std::auto_ptr <XMLFile> file ( pFile ); file->Extract(); @@ -390,12 +404,6 @@ bool HelpParser::Merge( pResData->sGId = pos->first; ProcessHelp( aLangHM , sCur , pResData , aMergeDataFile ); } - ByteString testpath; - if( bISO ){ - testpath = GetOutpath( rPathX , sCur , rPathY ); - MakeDir( testpath ); - } - else testpath = rPathX; String test( testpath , RTL_TEXTENCODING_ASCII_US ); // check and remove '\\' file->Write(test); // Always write! @@ -426,7 +434,13 @@ void HelpParser::MakeDir( const ByteString& sPath ){ String sPathtmp( sPath , RTL_TEXTENCODING_ASCII_US ); String sDir( sPathtmp.Copy( 0 , sPathtmp.SearchCharBackward( DirEntry::GetAccessDelimiter().GetBuffer() ) ) ); DirEntry aDirEntry( sDir ); - aDirEntry.MakeDir(); + + ByteString sTDir( sDir , sDir.Len() , RTL_TEXTENCODING_ASCII_US ); + if( aDirEntry.MakeDir() ){ + // printf("ERROR: Could NOT create Directory %s\n",sTDir.GetBuffer() ); + // exit( -1 ); + } + } /*****************************************************************************/ |