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:
parent
2701272f24
commit
bd5bd2c61e
|
@ -293,8 +293,18 @@ KPath::Normalize(bool traverseLeafLink)
|
||||||
if (fPathLength == 0)
|
if (fPathLength == 0)
|
||||||
return B_BAD_VALUE;
|
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());
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue