Domain::_LocateDirectory(): We first want to check whether the directory exists

before trying to map its parent. This is what _LocateEntry() already does, so
things can be simplified. Should fix problems with finding local source files
for good. Or so I hope. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31683 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-07-22 01:10:45 +00:00
parent 0b11ecb18c
commit e78744554e
1 changed files with 2 additions and 9 deletions

View File

@ -199,17 +199,10 @@ private:
return false; return false;
} }
// locate the parent, if possible, otherwise this directory if (!_LocateEntry(directory, locatedPath, true, true))
BString locatedDirectory;
BString locatedName;
_SplitNormalizedPath(locatedPath, locatedDirectory, locatedName);
if (locatedName != directory->Name())
return false; return false;
if (_LocateDirectory(directory->Parent(), locatedDirectory)) { _LocateEntries(directory, locatedPath);
directory->SetLocatedPath(locatedPath, true);
_LocateEntries(directory, locatedPath);
}
return true; return true;
} }