debug_resolve_vnode_path(): Avoid duplicate slash at the beginning of the

path.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35642 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-02-27 20:29:11 +00:00
parent 56a3f5184c
commit 7d9bce2483

View File

@ -3067,8 +3067,9 @@ debug_resolve_vnode_path(struct vnode* vnode, char* buffer, size_t bufferSize,
}
if (vnode == sRoot) {
_truncated = !debug_prepend_vnode_name_to_path(buffer, bufferSize,
"/");
_truncated = bufferSize == 0;
if (!_truncated)
buffer[--bufferSize] = '/';
return buffer + bufferSize;
}