From 0c7085458e6e668ce9fd67e1c6d749b8e9898764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 12 May 2009 18:35:31 +0000 Subject: [PATCH] Make the partition ID check more flexible, if partitions just pop up out of nowhere, we still want to be able to automount them, even though the notification is not for a device. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30720 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/AutoMounter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/kits/tracker/AutoMounter.cpp b/src/kits/tracker/AutoMounter.cpp index b4d607bcb8..fb923647c7 100644 --- a/src/kits/tracker/AutoMounter.cpp +++ b/src/kits/tracker/AutoMounter.cpp @@ -200,9 +200,15 @@ AutoMounter::_MountVolumes(mount_mode normal, mount_mode removable, { if (fOnlyOnDeviceID >= 0) { // only mount partitions on the given device id + // or if the partition ID is already matched BPartition* device = partition; - while (device->Parent() != NULL) + while (device->Parent() != NULL) { + if (device->ID() == fOnlyOnDeviceID) { + // we are happy + break; + } device = device->Parent(); + } if (device->ID() != fOnlyOnDeviceID) return false; }