[partition] Don't set empty labels

This commit is contained in:
Adriaan de Groot 2022-02-08 19:01:41 +01:00
parent 0be88f1453
commit 03291fb726

View File

@ -553,6 +553,11 @@ PartitionCoreModule::formatPartition( Device* device, Partition* partition )
void void
PartitionCoreModule::setFilesystemLabel( Device* device, Partition* partition, const QString& newLabel ) PartitionCoreModule::setFilesystemLabel( Device* device, Partition* partition, const QString& newLabel )
{ {
if ( newLabel.isEmpty() )
{
// Don't bother
return;
}
auto deviceInfo = infoForDevice( device ); auto deviceInfo = infoForDevice( device );
Q_ASSERT( deviceInfo ); Q_ASSERT( deviceInfo );