Accidentially removed one preparation/cancellation too many. Added it back
but cancel only if preparing was successful. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26463 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -505,6 +505,7 @@ fSurfaceTestMI->SetEnabled(false);
|
|||||||
parentPartition = disk->FindDescendant(parentID);
|
parentPartition = disk->FindDescendant(parentID);
|
||||||
|
|
||||||
if (parentPartition) {
|
if (parentPartition) {
|
||||||
|
bool prepared = disk->PrepareModifications() == B_OK;
|
||||||
fCreateMenu->SetEnabled(true);
|
fCreateMenu->SetEnabled(true);
|
||||||
BString supportedChildType;
|
BString supportedChildType;
|
||||||
int32 cookie = 0;
|
int32 cookie = 0;
|
||||||
@@ -522,6 +523,8 @@ fSurfaceTestMI->SetEnabled(false);
|
|||||||
if (fCreateMenu->CountItems() == 0)
|
if (fCreateMenu->CountItems() == 0)
|
||||||
fprintf(stderr, "Failed to get supported child types: %s\n",
|
fprintf(stderr, "Failed to get supported child types: %s\n",
|
||||||
strerror(ret));
|
strerror(ret));
|
||||||
|
if (prepared)
|
||||||
|
disk->CancelModifications();
|
||||||
} else {
|
} else {
|
||||||
fCreateMenu->SetEnabled(false);
|
fCreateMenu->SetEnabled(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user