From c6d29aa7e8456d688e5efea21d4b363cb92a54be Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Fri, 19 Aug 2016 12:16:30 +0100 Subject: [PATCH] Include extended partitions in the count of active partitions Trying to create a new partition table on a device with active partitions reports the number of active partitions in the error dialog. However when there is a busy logical partition the number of reported busy partitions will be one less than the number of partitions in the main UI showing the busy symbol. GParted considers extended partitions as busy when any of the logical partitions it contains as busy. Display in the main UI reflects this. Fix Win_GParted::active_partitions_on_device_count() to not exclude extended partitions from the count. --- src/Win_GParted.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 13b32446..44c7102c 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -2837,9 +2837,8 @@ int Win_GParted::active_partitions_on_device_count( const Device & device ) //Count the active partitions on the device for ( unsigned int k=0; k < device .partitions .size(); k++ ) { - //Count the active primary partitions + // Count the active primary and extended partitions if ( device .partitions[ k ] .busy - && device .partitions[ k ] .type != TYPE_EXTENDED && device .partitions[ k ] .type != TYPE_UNALLOCATED ) active_count++ ;