Duplicate separator fix, AROS seems to need this.
This commit is contained in:
parent
0e08b213f1
commit
ec90cdc0a5
|
@ -200,10 +200,7 @@ void cFCODataSourceIterImpl::Next()
|
||||||
iFCO* cFCODataSourceIterImpl::CreateFCO() //throw (eError)
|
iFCO* cFCODataSourceIterImpl::CreateFCO() //throw (eError)
|
||||||
{
|
{
|
||||||
ASSERT( ! Done() );
|
ASSERT( ! Done() );
|
||||||
|
InitializeTypeInfo( *mCurPos );
|
||||||
if( ! InitializeTypeInfo( *mCurPos ) )
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
(*mCurPos)->AddRef();
|
(*mCurPos)->AddRef();
|
||||||
return *mCurPos;
|
return *mCurPos;
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,29 +266,34 @@ void cFCOName::ParseString(const TCHAR* str)
|
||||||
void cFCOName::ParseString( const TCHAR* pszin )
|
void cFCOName::ParseString( const TCHAR* pszin )
|
||||||
{
|
{
|
||||||
ASSERT(mpPathName != 0);
|
ASSERT(mpPathName != 0);
|
||||||
|
ASSERT(pszin != 0);
|
||||||
|
|
||||||
mpPathName->ClearList();
|
mpPathName->ClearList();
|
||||||
|
|
||||||
TSTRING ats = const_cast<TCHAR *>(pszin + 0);
|
const TCHAR* at = (pszin + 0);
|
||||||
TSTRING::const_iterator at = ats.begin();
|
const TCHAR* begin = at;
|
||||||
TSTRING::const_iterator end = at;
|
const TCHAR* end = at;
|
||||||
while ( *end ) ++end; // NOTE: Find end
|
int components = 0;
|
||||||
|
|
||||||
|
while (*end)
|
||||||
|
++end;
|
||||||
|
|
||||||
TSTRING::const_iterator beg = at;
|
|
||||||
while (at < end)
|
while (at < end)
|
||||||
{
|
{
|
||||||
while ( !(*at == mDelimiter) && at < end )
|
while (!(*at == mDelimiter) && (at < end))
|
||||||
at = *at ? at + 1 : at;
|
at++;
|
||||||
|
|
||||||
if ( at == beg && (*at ? at + 1 : at) >= end && at != ats.begin() )
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
TSTRING name(begin, at);
|
||||||
|
if (name.length() > 0 || components == 0)
|
||||||
|
{
|
||||||
cFCONameTblNode* pNode =
|
cFCONameTblNode* pNode =
|
||||||
cFCOName_i::msNameTbl.CreateNode( TSTRING( beg, at ) );
|
cFCOName_i::msNameTbl.CreateNode(name);
|
||||||
|
|
||||||
mpPathName->mNames.push_back(pNode);
|
mpPathName->mNames.push_back(pNode);
|
||||||
|
}
|
||||||
|
|
||||||
beg = ( at = (*at ? at + 1 : at) );
|
components++;
|
||||||
|
begin = (at = tss::strinc(at));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue