Normalize() didn't update fPathLength correctly. This did probably screw

up module image paths in module_init_post_boot_device(). Not sure whether
it also could cause #2776.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27760 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-09-27 19:11:40 +00:00
parent 2701272f24
commit bd5bd2c61e
1 changed files with 11 additions and 1 deletions

View File

@ -293,8 +293,18 @@ KPath::Normalize(bool traverseLeafLink)
if (fPathLength == 0)
return B_BAD_VALUE;
return vfs_normalize_path(fBuffer, fBuffer, fBufferSize, traverseLeafLink,
status_t error = vfs_normalize_path(fBuffer, fBuffer, fBufferSize,
traverseLeafLink,
team_get_kernel_team_id() == team_get_current_team_id());
if (error != B_OK) {
// vfs_normalize_path() might have screwed up the previous path -- unset
// it completely to avoid weird problems.
fBuffer[0] = '\0';
fPathLength = 0;
}
fPathLength = strlen(fBuffer);
return B_OK;
}