[gparted] Reverse umounting order in xfs::copy



commit e247357b51ceb92365c4bc02e92a7698c5324d48
Author: Stephen Kirkby <mail stephenkirkby co uk>
Date:   Sun Nov 13 12:43:05 2011 +0000

    Reverse umounting order in xfs::copy
    
    See bug #663806 - Cannot copy XFS filesystem to new smaller
                      partition anymore

 src/xfs.cc |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/xfs.cc b/src/xfs.cc
index 9d67d68..903d99b 100644
--- a/src/xfs.cc
+++ b/src/xfs.cc
@@ -295,12 +295,11 @@ bool xfs::copy( const Glib::ustring & src_part_path,
 							operationdetail .get_last_child() .set_status( STATUS_ERROR ) ;
 						}
 						
-						//unmount destination partition
+						//unmount source partition
 						operationdetail .add_child(
-							OperationDetail( String::ucompose( _("unmount %1"),
-											    dest_part_path ) ) ) ;
+							OperationDetail( String::ucompose( _("unmount %1"), src_part_path ) ) ) ;
 					
-						if ( ! execute_command( "umount -v  " + dest_part_path,
+						if ( ! execute_command( "umount -v  " + src_part_path,
 									operationdetail .get_last_child() ) )
 						{
 							operationdetail .get_last_child() .set_status( STATUS_SUCCES ) ;
@@ -316,11 +315,11 @@ bool xfs::copy( const Glib::ustring & src_part_path,
 						operationdetail .get_last_child() .set_status( STATUS_ERROR ) ;
 					}
 					
-					//unmount source partition
+					//unmount destination partition
 					operationdetail .add_child(
-						OperationDetail( String::ucompose( _("unmount %1"), src_part_path ) ) ) ;
+						OperationDetail( String::ucompose( _("unmount %1"), dest_part_path ) ) ) ;
 				
-					if ( ! execute_command( "umount -v  " + src_part_path,
+					if ( ! execute_command( "umount -v  " + dest_part_path,
 								operationdetail .get_last_child() ) )
 					{
 						operationdetail .get_last_child() .set_status( STATUS_SUCCES ) ;



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