fixed a bug about safemode, noticed by John '[Beta]' Drinkwater. thanks.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9172 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2004-10-03 22:44:33 +00:00
parent 297f444091
commit 935d9cfc2d
1 changed files with 2 additions and 4 deletions

View File

@ -266,10 +266,8 @@ AddOnManager::RegisterAddOns()
node_ref nref;
BDirectory directory;
BPath path;
uint i = 0;
if (fSafeMode) // when safemode, only B_BEOS_ADDONS_DIRECTORY is used
i = 2;
for (i = 0 ; i < sizeof(directories) / sizeof(directory_which) ; i++)
// when safemode, only B_BEOS_ADDONS_DIRECTORY is used
for (uint32 i = fSafeMode ? 2 : 0 ; i < sizeof(directories) / sizeof(directory_which) ; i++)
for (uint32 j = 0 ; j < sizeof(subDirectories) / sizeof(char[24]) ; j++) {
if ((find_directory(directories[i], &path) == B_OK)
&& (path.Append(subDirectories[j]) == B_OK)