Skip move action because linux-swap contains no data (#589555)
Closes bug #589555 - Moving a swap partition needlessly copies all "data" on it
This commit is contained in:
parent
ca30f986f7
commit
232800d6cd
|
@ -1860,6 +1860,11 @@ bool GParted_Core::move_filesystem( const Partition & partition_old,
|
||||||
operationdetail .get_last_child() ) ;
|
operationdetail .get_last_child() ) ;
|
||||||
break ;
|
break ;
|
||||||
case GParted::FS::EXTERNAL:
|
case GParted::FS::EXTERNAL:
|
||||||
|
succes = set_proper_filesystem( partition_new .filesystem ) &&
|
||||||
|
p_filesystem ->move( partition_old
|
||||||
|
, partition_new
|
||||||
|
, operationdetail .get_last_child()
|
||||||
|
) ;
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ FS linux_swap::get_filesystem_support()
|
||||||
fs .write_label = FS::EXTERNAL ;
|
fs .write_label = FS::EXTERNAL ;
|
||||||
|
|
||||||
fs .copy = GParted::FS::EXTERNAL ;
|
fs .copy = GParted::FS::EXTERNAL ;
|
||||||
fs .move = GParted::FS::GPARTED ;
|
fs .move = GParted::FS::EXTERNAL ;
|
||||||
|
|
||||||
return fs ;
|
return fs ;
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,18 @@ bool linux_swap::move( const Partition & partition_new
|
||||||
, OperationDetail & operationdetail
|
, OperationDetail & operationdetail
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
//Since linux-swap does not contain data, do not actually move the partition
|
||||||
|
operationdetail .add_child(
|
||||||
|
OperationDetail(
|
||||||
|
/* TO TRANSLATORS: looks like Partition move action skipped because linux-swap file system does not contain data */
|
||||||
|
String::ucompose( _("Partition move action skipped because %1 file system does not contain data")
|
||||||
|
, Utils::get_filesystem_string( FS_LINUX_SWAP )
|
||||||
|
)
|
||||||
|
, STATUS_NONE
|
||||||
|
, FONT_ITALIC
|
||||||
|
)
|
||||||
|
) ;
|
||||||
|
|
||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue