Skip to content

Commit

Permalink
[nemo-systemsettings] Keep partitions around. Fixes JB#49758
Browse files Browse the repository at this point in the history
Even if they won't be visible in the UI, they are still needed for
filtering out partition tables.
  • Loading branch information
monich committed Aug 25, 2020
1 parent b4069a2 commit 06125c5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/udisks2blockdevices.cpp
Expand Up @@ -321,11 +321,17 @@ void BlockDevices::complete(Block *block, bool forceAccept)

bool willAccept = !unlocked && (block->isPartition() || block->isMountable() || block->isEncrypted() || block->isFormatting() || forceAccept);
qCInfo(lcMemoryCardLog) << "Completed block" << qPrintable(block->path())
<< "is" << (willAccept ? "accepted" : "rejected");
<< "is" << (willAccept ? "accepted" : block->isPartition() ? "kept" : "rejected");
block->dumpInfo();

if (willAccept) {
// Hope that somebody will handle this signal and call insert()
// to add this block to m_blockDevices.
emit newBlock(block);
} else if (block->isPartition()) {
// Silently keep partitions around so that we can filter out
// partition tables in timerEvent().
insert(block->path(), block);
} else {
// This is garbage block device that should not be exposed
// from the partition model.
Expand Down

0 comments on commit 06125c5

Please sign in to comment.