[gparted] Fix for FS flags becoming unknown after change label



commit a5242a28f4292a06f905bc89f53311831404b5e1
Author: Rogier Goossens <goossens rogier gmail com>
Date:   Sun Apr 1 10:53:56 2012 +0200

    Fix for FS flags becoming unknown after change label
    
    AFAICS, there is no reason to manually copy all partition fields,
    or to manually initialize the copy of the new partition object.
    So now the partition object is simply copied using assignment.

 src/Win_GParted.cc |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index c230282..683fb15 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -2339,22 +2339,9 @@ void Win_GParted::activate_label_partition()
 	{
 		dialog .hide() ;
 		//Make a duplicate of the selected partition (used in UNDO)
-		Partition part_temp ;
-		part_temp .Set( devices[ current_device ] .get_path(),
-				selected_partition .get_path(),
-				selected_partition .partition_number,
-				selected_partition .type,
-				selected_partition .filesystem,
-				selected_partition .sector_start,
-				selected_partition .sector_end,
-				devices[ current_device ] .sector_size,
-				selected_partition .inside_extended,
-				false ) ;
-		part_temp .Set_Unused( selected_partition.sectors_unused );
-		part_temp .set_used( selected_partition.sectors_used );
+		Partition part_temp = selected_partition ;
 
 		part_temp .label = dialog .get_new_label();
-		part_temp .uuid = selected_partition .uuid ;
 
 		Operation * operation = new OperationLabelPartition( devices[ current_device ],
 									selected_partition, part_temp ) ;



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