diff --git a/src/gui/partitionmanagerwidget.cpp b/src/gui/partitionmanagerwidget.cpp
index 3541752..899deef 100644
--- a/src/gui/partitionmanagerwidget.cpp
+++ b/src/gui/partitionmanagerwidget.cpp
@@ -669,20 +669,36 @@ bool PartitionManagerWidget::showInsertDialog(Partition& insertedPartition, qint
if (result != KDialog::Accepted)
return false;
}
- else if (KMessageBox::warningContinueCancel(this,
- i18nc("@info", "You are about to lose all data on partition "
- "%1."
- "Overwriting one partition with another (or with an image file) will "
- "destroy all data on this target partition."
- "If you continue now and apply the resulting operation in the main "
- "window, all data currently stored on %1 will "
- "unrecoverably be overwritten.",
- selectedPartition()->deviceNode()),
- i18nc("@title:window", "Really Overwrite Existing Partition?"),
- KGuiItem(i18nc("@action:button", "Overwrite Partition"), "arrow-right"),
- KStandardGuiItem::cancel(),
- "reallyOverwriteExistingPartition") == KMessageBox::Cancel)
- return false;
+ else
+ {
+ if (selectedPartition()->capacity() > insertedPartition.fileSystem().maxCapacity())
+ {
+ KMessageBox::sorry(this, i18nc("@info",
+ "The target partition is bigger than the source allows."
+ "You are trying to paste a %2 partition onto an existing partition "
+ "that is bigger than %1, the maximum capacity of a %2 file system.",
+ Capacity(insertedPartition.fileSystem().maxCapacity()).toString(Capacity::AppendUnit),
+ insertedPartition.fileSystem().name()
+ ),
+ i18nc("@title:window", "Target Partition Too Big"));
+ return false;
+ }
+
+ if (KMessageBox::warningContinueCancel(this,
+ i18nc("@info", "You are about to lose all data on partition "
+ "%1."
+ "Overwriting one partition with another (or with an image file) will "
+ "destroy all data on this target partition."
+ "If you continue now and apply the resulting operation in the main "
+ "window, all data currently stored on %1 will "
+ "unrecoverably be overwritten.",
+ selectedPartition()->deviceNode()),
+ i18nc("@title:window", "Really Overwrite Existing Partition?"),
+ KGuiItem(i18nc("@action:button", "Overwrite Partition"), "arrow-right"),
+ KStandardGuiItem::cancel(),
+ "reallyOverwriteExistingPartition") == KMessageBox::Cancel)
+ return false;
+ }
if (insertedPartition.length() < sourceLength)
{