Skip to content

Commit

Permalink
Merge branch 'jb49758' into 'master'
Browse files Browse the repository at this point in the history
Keep partitions around

See merge request mer-core/nemo-qml-plugin-systemsettings!152
  • Loading branch information
monich committed Aug 26, 2020
2 parents fd255f9 + 06125c5 commit 30c7ceb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion src/udisks2monitor.cpp
Expand Up @@ -74,7 +74,7 @@ UDisks2::Monitor *UDisks2::Monitor::sharedInstance = nullptr;

UDisks2::Monitor *UDisks2::Monitor::instance()
{
Q_ASSERT(!sharedInstance);
Q_ASSERT(sharedInstance);

return sharedInstance;
}
Expand Down

0 comments on commit 30c7ceb

Please sign in to comment.