File parted-dont-snap-to-boundaries-of-freespace.patch of Package parted.3440
---
parted/parted.c | 7 +++++++
1 file changed, 7 insertions(+)
Index: parted-3.1/parted/parted.c
===================================================================
--- parted-3.1.orig/parted/parted.c
+++ parted-3.1/parted/parted.c
@@ -402,6 +402,13 @@ snap_to_boundaries (PedGeometry* new_geo
end_part = ped_disk_get_partition_by_sector (disk, end);
adjacent = (start_part->geom.end + 1 == end_part->geom.start);
+ /* If start lies within free space, then don't allow it to move up.
+ * Likewise for end - bnc#950724 */
+ if (start_part->type == PED_PARTITION_FREESPACE)
+ start_allow &= ~MOVE_UP;
+ if (end_part->type == PED_PARTITION_FREESPACE)
+ end_allow &= ~MOVE_DOWN;
+
/* If we can snap to old_geom, then we will... */
/* and this will enforce the snapped positions */
if (old_geom) {