diff --git a/src/plugins/sfdisk/sfdiskpartitiontable.cpp b/src/plugins/sfdisk/sfdiskpartitiontable.cpp index 07f0686..1db421d 100644 --- a/src/plugins/sfdisk/sfdiskpartitiontable.cpp +++ b/src/plugins/sfdisk/sfdiskpartitiontable.cpp @@ -202,8 +202,11 @@ static QLatin1String getPartitionType(FileSystem::Type t, PartitionTable::TableT bool SfdiskPartitionTable::setPartitionSystemType(Report& report, const Partition& partition) { + QString partitionType = getPartitionType(partition.fileSystem().type(), m_device->partitionTable()->type()); + if (partitionType.isEmpty()) + return true; ExternalCommand sfdiskCommand(report, QStringLiteral("sfdisk"), { QStringLiteral("--part-type"), m_device->deviceNode(), QString::number(partition.number()), - getPartitionType(partition.fileSystem().type(), m_device->partitionTable()->type()) } ); + partitionType } ); return sfdiskCommand.run(-1) && sfdiskCommand.exitCode() == 0; }