summaryrefslogtreecommitdiff
path: root/ucb/source
diff options
context:
space:
mode:
authorHennes Rohling <hro@openoffice.org>2001-05-14 10:22:10 +0000
committerHennes Rohling <hro@openoffice.org>2001-05-14 10:22:10 +0000
commit2cd0bcafc10cf4ed560d822532e0ebda8a8d64f7 (patch)
tree0568bc52c2037fdd64addf3c594e23974e196ad7 /ucb/source
parent9b3bc904bd7b1570fe46bf6146408b09022b900b (diff)
rtl_string getToken change
Diffstat (limited to 'ucb/source')
-rw-r--r--ucb/source/ucp/file/shell.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 08eb16eafa3b..3af74fce0762 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shell.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: hro $ $Date: 2001-05-14 07:29:21 $
+ * last change: $Author: hro $ $Date: 2001-05-14 11:22:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -3616,20 +3616,19 @@ extern "C" oslFileError osl_getRealPath(rtl_uString* strPath, rtl_uString** strR
static sal_Bool SAL_CALL makeAbsolutePath( const rtl::OUString& aRelPath, rtl::OUString& aAbsPath )
{
- sal_Int32 nTokens = aRelPath.getTokenCount( '/' );
- sal_Int32 iToken = 0;
+ sal_Int32 nIndex = 0;
std::vector< rtl::OUString > aTokenStack;
- for ( iToken = 1; iToken < nTokens; iToken++ )
+ do
{
- rtl::OUString aToken = aRelPath.getToken( iToken, '/' );
+ rtl::OUString aToken = aRelPath.getToken( 0, '/', nIndex );
if ( aToken.compareTo( rtl::OUString::createFromAscii( ".." ) ) == 0 )
aTokenStack.pop_back();
else
aTokenStack.push_back( aToken );
- }
+ } while ( nIndex >= 0 );
std::vector< rtl::OUString >::iterator it;