From f03f8d3b857f8543273cb2b6c913409d1c89c472 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Fri, 2 Nov 2007 16:46:14 +0000 Subject: [PATCH] INTEGRATION: CWS adc18 (1.2.38); FILE MERGED 2007/09/20 12:16:14 np 1.2.38.1: #i81775# --- cosv/source/storage/dirchain.cxx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/cosv/source/storage/dirchain.cxx b/cosv/source/storage/dirchain.cxx index 84447fca5df9..8273019a4c21 100644 --- a/cosv/source/storage/dirchain.cxx +++ b/cosv/source/storage/dirchain.cxx @@ -4,9 +4,9 @@ * * $RCSfile: dirchain.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-08 08:05:30 $ + * last change: $Author: hr $ $Date: 2007-11-02 17:46:14 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,11 +40,14 @@ #include + + namespace csv { namespace ploc { + DirectoryChain::DirectoryChain() { } @@ -65,15 +68,19 @@ DirectoryChain::Set( const char * i_sSubPath, bool i_bPathIsAlwaysDir, const char * i_sDelimiter ) { + csv_assert(i_sDelimiter != 0); + if (i_sSubPath == 0) + return; + const char * pRestPath = i_sSubPath; - if ( pRestPath != 0 ? *pRestPath == *i_sDelimiter : false ) + if (*pRestPath == *i_sDelimiter) ++pRestPath; for ( const char * pDirEnd = strchr(pRestPath,*i_sDelimiter); pDirEnd != 0; pDirEnd = strchr(pRestPath,*i_sDelimiter) ) { - aPath.push_back( String(pRestPath, pDirEnd - pRestPath) ); + aPath.push_back( String(pRestPath, pDirEnd) ); pRestPath = pDirEnd + 1; } if (*pRestPath != 0 AND i_bPathIsAlwaysDir) @@ -151,8 +158,6 @@ DirectoryChain::Get( bostream & o_rPath, + } // namespace ploc } // namespace csv - - -