[gparted] Fix for FS size & flags becoming unknown after change UUID



commit ea26fcb4fafad20b7300473b3c19c45856bf2db0
Author: Rogier Goossens <goossens rogier gmail com>
Date:   Sun Apr 1 10:49:19 2012 +0200

    Fix for FS size & flags becoming unknown after change UUID
    
    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 |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 06b38b9..c230282 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -2396,19 +2396,7 @@ void Win_GParted::activate_change_uuid()
 	}
 
 	//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 .label = selected_partition .label ;
+	Partition part_temp = selected_partition ;
 
 	if ( part_temp .filesystem == GParted::FS_NTFS )
 		//Explicitly ask for half, so that the user will be aware of it



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