From 3005b1d6f565dc4cfa410cf956d2cc3ab55c3b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 6 Nov 2008 11:50:38 +0000 Subject: [PATCH] Always retrieve the "would be mount point" of the partition in AutoMounter::InitialMountVisitor::Visit(), otherwise restoring mount options, like read-only mounting, would never work. This kind of mixes the options of the mount settings, since it partially remembers the settings even if the option is not "only previously mounted disks", but it should not hurt anyways. As a side effect, this should also fix the mount notification sent to Tracker, as the path should only have been correct for the "mount previous disks" setting. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28533 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/AutoMounter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kits/tracker/AutoMounter.cpp b/src/kits/tracker/AutoMounter.cpp index 40e67b3952..bf018f211a 100644 --- a/src/kits/tracker/AutoMounter.cpp +++ b/src/kits/tracker/AutoMounter.cpp @@ -135,11 +135,13 @@ AutoMounter::_MountVolumes(mount_mode normal, mount_mode removable, return false; BPath path; + if (partition->GetPath(&path) != B_OK) + return false; + if (mode == kRestorePreviousVolumes) { // mount all volumes that were stored in the settings file const char *volumeName = NULL; - if (partition->GetPath(&path) != B_OK - || partition->ContentName() == NULL + if (partition->ContentName() == NULL || fPrevious.FindString(path.Path(), &volumeName) != B_OK || strcmp(volumeName, partition->ContentName()))