[gparted] Enable copy to smaller XFS partition (#663806)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Enable copy to smaller XFS partition (#663806)
- Date: Fri, 11 Nov 2011 18:54:25 +0000 (UTC)
commit 38aab666b47d0d66fe41ebdf48899d099230c02b
Author: Curtis Gedak <gedakc gmail com>
Date: Fri Nov 11 11:52:49 2011 -0700
Enable copy to smaller XFS partition (#663806)
Closes Bug #663806 - Cannot copy XFS filesystem to new smaller
partition anymore
src/GParted_Core.cc | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index e343a0a..9f8ebf3 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -1557,7 +1557,9 @@ bool GParted_Core::create_partition( Partition & new_partition, OperationDetail
if ( constraint )
{
- if ( min_size > 0 )
+ if ( min_size > 0
+ && new_partition .filesystem != FS_XFS // Permit copying to smaller xfs partition
+ )
constraint ->min_size = min_size ;
if ( ped_disk_add_partition( lp_disk, lp_partition, constraint ) && commit() )
@@ -2244,8 +2246,10 @@ bool GParted_Core::copy( const Partition & partition_src,
Byte_Value min_size,
OperationDetail & operationdetail )
{
- if ( partition_dst .get_byte_length() < partition_src .get_byte_length() )
- {
+ if ( partition_dst .get_byte_length() < partition_src .get_byte_length()
+ && partition_src .filesystem != FS_XFS // Permit copying to smaller xfs partition
+ )
+ {
operationdetail .add_child( OperationDetail(
_("the destination is smaller than the source partition"), STATUS_ERROR, FONT_ITALIC ) ) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]