From b6713459e8b33a5541343ca5f223f1d0a767b29f Mon Sep 17 00:00:00 2001 From: Maciej Kisielewski Date: Thu, 15 Mar 2018 12:16:12 +0100 Subject: don't require 'partition' record for mounted filesystems On some systems udisks2 doesn't yield the (...).partition record. If the change detected is a new mounted filesystem, I think we should treat it as a drive insertion. Fixes: LP:1755402 Signed-off-by: Maciej Kisielewski --- bin/removable_storage_watcher | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/removable_storage_watcher b/bin/removable_storage_watcher index 522e7a8..d5a0722 100755 --- a/bin/removable_storage_watcher +++ b/bin/removable_storage_watcher @@ -619,6 +619,10 @@ class UDisks2StorageDeviceListener: and record.value.prop_name == "MountPoints" and record.value.prop_value != []): found.add('mounted') + # On some systems partition are reported as mounted + # filesystems, without 'partition' record + if set(['partition', 'mounted']).issubset(needs): + needs.remove('partition') # Finally memorize the drive the block device belongs to elif (record.value.iface_name == "org.freedesktop.UDisks2.Block" -- cgit v1.2.3