while ((dp=IDOS->GetDeviceProcFlags(node->ln_Name,dp,LDF_ALL)))
{
if (dp->dvp_Flags & DVPB_ASSIGNMENT)
{
IDOS->Printf("MultiAssign: %s\n",node->ln_Name);
// AssignsNode->IsMultiAssign=TRUE;
filesystemtask = IDOS->GetFileSysPort();
do
{
if ((dp2=IDOS->GetDeviceProcFlags(node->ln_Name,dp2,LDF_ALL)))
{
IDOS->SetFileSysPort(dp2->dvp_Port);
if ((IDOS->NameFromLock(dp2->dvp_Lock,Misc1Buffer,1024)))
{
IDOS->Printf("MultiAssign: %s -> %s\n",node->ln_Name,Misc1Buffer);
error=0;
}
else
error=IDOS->IoErr();
if (error != 0)
break;
}
} while (dp2 && (dp2->dvp_Flags & DVPF_MULTIASSIGN));
IDOS->SetFileSysPort(filesystemtask);
if (dp2)
{
IDOS->FreeDeviceProc(dp2);
dp2=NULL;
}
}
}
}
if (dp)
IDOS->FreeDeviceProc(dp);
IDOS->FreeDosObject(DOS_VOLUMELIST,ADOList);
}
return(Success);
}
Are the filesystemtask = IDOS->GetFileSysPort(); and IDOS->SetFileSysPort(dp2->dvp_Port); and IDOS->SetFileSysPort(filesystemtask); necessary? It works without them.
Workbench Explorer - A better way to browse drawers
Are the filesystemtask = IDOS->GetFileSysPort(); and IDOS->SetFileSysPort(dp2->dvp_Port); and IDOS->SetFileSysPort(filesystemtask); necessary? It works without them.
They are necessary because dp2->dvp_Lock can be ZERO if the assign is on the filesystem root.
If you didn't have these statements you would always get the SYS: partition from IDOS->NameFromLock() for such assigns.