diff -Nur gparted-0.1/src/ntfs.cc gparted-0.1.new/src/ntfs.cc --- gparted-0.1/src/ntfs.cc 2005-12-28 16:43:06.000000000 +0000 +++ gparted-0.1.new/src/ntfs.cc 2006-05-23 11:27:57.594308587 +0100 @@ -84,12 +84,15 @@ bool ntfs::Resize( const Partition & partition_new, bool fill_partition ) { - Glib::ustring str_temp = "echo y | ntfsresize -f " + partition_new .partition ; + Glib::ustring str_temp = "ntfsresize --force --force " + partition_new .partition ; if ( ! fill_partition ) str_temp += " -s " + Utils::num_to_str( partition_new .Get_Length_MB( ) - cylinder_size, true ) + "M" ; - return ! Execute_Command( str_temp ) ; + if ( ! Execute_Command( str_temp + " --no-action" ) ) + return ! Execute_Command( str_temp ); + else + return false; } bool ntfs::Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) @@ -106,9 +114,7 @@ bool ntfs::Check_Repair( const Partition & partition ) { - //according to Szaka it's best to use ntfsresize to check the partition for errors - //since --info is read-only i'll leave it out. just calling ntfsresize --force has also a tendency of fixing stuff :) - return Resize( partition, true ) ; + return ! Execute_Command( "ntfsresize -i -f -v " + partition .partition ); } int ntfs::get_estimated_time( long MB_to_Consider )