From 0b5e5040ebb3c172ea9c70af660e73957fc1334e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 5 Oct 2019 11:52:59 +0100 Subject: [PATCH] Do not align partitions if they are mounted. Moving data when partitions are mounted is almost guaranteed to cause data loss. BUG: 412575 --- src/gui/partresizerwidget.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/partresizerwidget.h b/src/gui/partresizerwidget.h index 929223b..dbbd57d 100644 --- a/src/gui/partresizerwidget.h +++ b/src/gui/partresizerwidget.h @@ -19,12 +19,12 @@ #define KPMCORE_PARTRESIZERWIDGET_H +#include "core/partition.h" #include "util/libpartitionmanagerexport.h" #include #include -class Partition; class PartWidget; class Device; @@ -97,6 +97,8 @@ public: } bool align() const { + if (partition().isMounted()) + return false; return m_Align; /**< @return true if the Partition is to be aligned */ } void setAlign(bool b) {