[partition] Set intent while creating FS-labeling job
This commit is contained in:
parent
23d203b00b
commit
3881737bbd
@ -557,15 +557,17 @@ 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() )
|
if ( newLabel == PartitionInfo::label( partition ) )
|
||||||
{
|
{
|
||||||
// Don't bother
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto deviceInfo = infoForDevice( device );
|
auto deviceInfo = infoForDevice( device );
|
||||||
Q_ASSERT( deviceInfo );
|
Q_ASSERT( deviceInfo );
|
||||||
|
|
||||||
OperationHelper helper( partitionModelForDevice( device ), this );
|
OperationHelper helper( partitionModelForDevice( device ), this );
|
||||||
|
PartitionInfo::setLabel( partition, newLabel );
|
||||||
|
deviceInfo->takeJob< ChangeFilesystemLabelJob >( partition );
|
||||||
deviceInfo->makeJob< ChangeFilesystemLabelJob >( partition, newLabel );
|
deviceInfo->makeJob< ChangeFilesystemLabelJob >( partition, newLabel );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,6 @@ updateLabel( PartitionCoreModule* core, Device* device, Partition* partition, co
|
|||||||
if ( partition->fileSystem().type() != FileSystem::Type::Unformatted && fsLabel != partition->fileSystem().label() )
|
if ( partition->fileSystem().type() != FileSystem::Type::Unformatted && fsLabel != partition->fileSystem().label() )
|
||||||
{
|
{
|
||||||
core->setFilesystemLabel( device, partition, fsLabel );
|
core->setFilesystemLabel( device, partition, fsLabel );
|
||||||
PartitionInfo::setLabel(partition, fsLabel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user