/* ######################################################################
File Listing - Manages a Cache of File -> Package names.
/* ######################################################################
File Listing - Manages a Cache of File -> Package names.
NodeIterator FromN = GetNode(From,From+strlen(From),0,true,true);
NodeIterator ToN = GetNode(To,To+strlen(To),0,true,true);
if (FromN.end() == true || ToN.end() == true)
NodeIterator FromN = GetNode(From,From+strlen(From),0,true,true);
NodeIterator ToN = GetNode(To,To+strlen(To),0,true,true);
if (FromN.end() == true || ToN.end() == true)
// Should never happen
if ((FromN->Flags & Node::Diversion) != Node::Diversion ||
(ToN->Flags & Node::Diversion) != Node::Diversion)
// Should never happen
if ((FromN->Flags & Node::Diversion) != Node::Diversion ||
(ToN->Flags & Node::Diversion) != Node::Diversion)
{
// It could be that the other diversion is no longer in use
if ((DiverP[ToN->Pointer].Flags & Diversion::Touched) == Diversion::Touched)
{
// It could be that the other diversion is no longer in use
if ((DiverP[ToN->Pointer].Flags & Diversion::Touched) == Diversion::Touched)
From,To,ToN.File(),ToN.Dir().Name());
// We can erase it.
From,To,ToN.File(),ToN.Dir().Name());
// We can erase it.
// Can only have one diversion of the same files
Diversion *Div = DiverP + Diver;
if ((Div->Flags & Diversion::Touched) == Diversion::Touched)
// Can only have one diversion of the same files
Diversion *Div = DiverP + Diver;
if ((Div->Flags & Diversion::Touched) == Diversion::Touched)