Пример #1
0
void ADLSearchManager::finalizeDestinationDirectories(DestDirList& destDirVector, DirectoryListing::Directory* root)
{
	string szDiscard("<<<" + STRING(ADLS_DISCARD) + ">>>");
	
	// Add non-empty destination directories to the top level
	for (auto id = destDirVector.begin(); id != destDirVector.end(); ++id)
	{
		if (id->dir->m_files.empty() && id->dir->directories.empty())
		{
			safe_delete(id->dir);
		}
		else if (stricmp(id->dir->getName(), szDiscard) == 0)
		{
			safe_delete(id->dir);
		}
		else
		{
			root->directories.push_back(id->dir);
		}
	}
	
	for (auto ip = collection.begin(); ip != collection.end(); ++ip)
	{
		ip->unprepare();
	}
}
Пример #2
0
void ADLSearchManager::finalizeDestinationDirectories(DestDirList& destDirs, DirectoryListing::Directory* root) {
    string szDiscard("<<<" + string(_("Discard")) + ">>>");

    // Add non-empty destination directories to the top level
    for(auto& i: destDirs) {
        if(i.dir->files.empty() && i.dir->directories.empty()) {
            delete i.dir;
        } else if(Util::stricmp(i.dir->getName(), szDiscard) == 0) {
            delete i.dir;
        } else {
            root->directories.insert(i.dir);
        }
    }
}