BOOL CPackFiles::RecurseWriteUnwrittenNames(CFileNodePackFileNode* pcNode, CChars* pszPath) { CFileNodePackFileNode* pcChild; int i; BOOL bResult; int iPathLength; CChars szPath; if (pcNode->IsDirectory()) { iPathLength = pszPath->Length(); for (i = 0; i < pcNode->Directory()->maNodeFiles.NumElements(); i++) { pcChild = (CFileNodePackFileNode*)pcNode->Directory()->maNodeFiles.Get(i); pszPath->Append("/"); pszPath->Append(pcChild->GetName()); bResult = RecurseWriteUnwrittenNames(pcChild, pszPath); pszPath->SetLength(iPathLength); if (!bResult) { return FALSE; } } return TRUE; } else if (pcNode->IsFile()) { if (!pcNode->File()->IsNameWritten()) { szPath.Init(pszPath->Text(1)); ReturnOnFalse(szPath.WriteString(&mcFile)); szPath.Kill(); return pcNode->File()->Save(&mcFile); } return TRUE; } else { return FALSE; } }