From 8336fcffeaafb11f41e59b9657810c58ad0a945b Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Tue, 5 Dec 2006 21:47:34 +0000 Subject: [PATCH] fixed 'Could not detect file system.' error with fat and hfs filesystem * src/GParted_Core.cc: fixed 'Could not detect file system.' error with fat and hfs filesystem when performing a move to the left. (thanks to 'the Bogerds' for borrowing me an usbstick ;) ) --- ChangeLog | 6 ++++++ src/GParted_Core.cc | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c13567b3..d1858384 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-12-05 Bart Hakvoort + + * src/GParted_Core.cc: fixed 'Could not detect file system.' error + with fat and hfs filesystem when performing a move to the left. + (thanks to 'the Bogerds' for borrowing me an usbstick ;) ) + 2006-12-01 Bart Hakvoort * configure.in: gparted-0.3.2 diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 5cab43fd..5d7de0b2 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -1235,16 +1235,18 @@ bool GParted_Core::resize_move_filesystem_using_libparted( const Partition & par bool return_value = false ; if ( open_device_and_disk( partition_old .device_path ) ) { - PedPartition * lp_partition = NULL ; PedFileSystem * fs = NULL ; PedGeometry * lp_geom = NULL ; - lp_partition = ped_disk_get_partition_by_sector( lp_disk, partition_old .get_sector() ) ; - if ( lp_partition ) + lp_geom = ped_geometry_new( lp_device, + partition_old .sector_start, + partition_old .get_length() ) ; + if ( lp_geom ) { - fs = ped_file_system_open( & lp_partition ->geom ); + fs = ped_file_system_open( lp_geom ); if ( fs ) { + lp_geom = NULL ; lp_geom = ped_geometry_new( lp_device, partition_new .sector_start, partition_new .get_length() ) ;