* VisitEachPartition() was not working correctly, terminatedEarly was not
maintained git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23292 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
866072435f
commit
2787214419
@ -212,8 +212,13 @@ BDiskDeviceRoster::VisitEachPartition(BDiskDeviceVisitor *visitor,
|
||||
BDiskDevice deviceOnStack;
|
||||
BDiskDevice *useDevice = (device ? device : &deviceOnStack);
|
||||
BPartition *foundPartition = NULL;
|
||||
while (!foundPartition && GetNextDevice(useDevice) == B_OK)
|
||||
while (GetNextDevice(useDevice) == B_OK) {
|
||||
foundPartition = useDevice->VisitEachDescendant(visitor);
|
||||
if (foundPartition) {
|
||||
terminatedEarly = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
fDeviceCookie = oldCookie;
|
||||
if (!terminatedEarly)
|
||||
useDevice->Unset();
|
||||
|
Loading…
x
Reference in New Issue
Block a user