[gparted] Disallow formatting of unrecognised whole disk devices again (#788308)



commit c1807ca504271cf4380abcfb1d55e5da61605935
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat Aug 20 16:00:51 2016 +0100

    Disallow formatting of unrecognised whole disk devices again (#788308)
    
    Fix up following switch from whole_device flag to TYPE_UNPARTITIONED.
    
    Bug 788308 - Remove whole_device partition flag

 src/Win_GParted.cc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 02dfe04..bac0e17 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -1236,9 +1236,10 @@ void Win_GParted::set_valid_operations()
        }       
        
        // PRIMARY, LOGICAL and UNPARTITIONED; partitions with supported file system.
-       if ( selected_partition_ptr->type == TYPE_PRIMARY       ||
-            selected_partition_ptr->type == TYPE_LOGICAL       ||
-            selected_partition_ptr->type == TYPE_UNPARTITIONED    )
+       if ( ( selected_partition_ptr->type == TYPE_PRIMARY       ||
+              selected_partition_ptr->type == TYPE_LOGICAL       ||
+              selected_partition_ptr->type == TYPE_UNPARTITIONED    ) &&
+            selected_partition_ptr->filesystem != FS_UNALLOCATED         )
        {
                allow_format( true ) ;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]