diff --git a/src/ops/restoreoperation.cpp b/src/ops/restoreoperation.cpp index 37a1de3..682da99 100644 --- a/src/ops/restoreoperation.cpp +++ b/src/ops/restoreoperation.cpp @@ -30,6 +30,7 @@ #include "jobs/resizefilesystemjob.h" #include "fs/filesystem.h" +#include "fs/luks.h" #include "fs/filesystemfactory.h" #include "util/capacity.h" @@ -198,6 +199,9 @@ bool RestoreOperation::canRestore(const Partition* p) if (p->roles().has(PartitionRole::Extended)) return false; + if (p->roles().has(PartitionRole::Luks)) + return FS::luks::mapperName(p->deviceNode()).isEmpty(); + return true; } /** Creates a new Partition to restore to.