From 499c81036f137b5a6b62d8f619fb20dd09e83b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 21 Jul 2008 15:44:45 +0000 Subject: [PATCH] * Fixed automounting all BFS disk when Tracker starts. * Fixed mounting previously mounted partitions. fSettings was never initialized when restoring the settings. The code I removed earlier didn't do that either. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26548 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/AutoMounter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kits/tracker/AutoMounter.cpp b/src/kits/tracker/AutoMounter.cpp index 1c8d3c0641..b16bd1ca86 100644 --- a/src/kits/tracker/AutoMounter.cpp +++ b/src/kits/tracker/AutoMounter.cpp @@ -45,6 +45,7 @@ All rights reserved. # include # include # include +# include # include #endif @@ -133,7 +134,7 @@ AutoMounter::_MountVolumes(mount_mode normal, mount_mode removable, if (mode == kRestorePreviousVolumes) { // mount all volumes that were stored in the settings file - const char *volumeName; + const char *volumeName = NULL; BPath path; if (partition->GetPath(&path) != B_OK || partition->ContentName() == NULL @@ -142,7 +143,7 @@ AutoMounter::_MountVolumes(mount_mode normal, mount_mode removable, return false; } else if (mode == kOnlyBFSVolumes) { if (partition->ContentType() == NULL - || strcmp(partition->ContentType(), "BFS")) + || strcmp(partition->ContentType(), kPartitionTypeBFS)) return false; } @@ -367,7 +368,10 @@ AutoMounter::_ReadSettings() delete [] buffer; + // update flags and modes from the message _UpdateSettingsFromMessage(&message); + // copy the previously mounted partitions + fSettings = message; }