From 9ae93dcd7fa2b673f5f6c8e5488a547350fe3e2f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 17 Feb 2008 13:32:08 +0000 Subject: [PATCH] _user_normalize_path() was broken for symlinks in absolute paths. Fixes #1778. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23969 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/fs/vfs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index 7f21fa281d..06a01551c1 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -1940,7 +1941,7 @@ vnode_and_path_to_dir_vnode(struct vnode* vnode, char *path, return B_BAD_VALUE; if (*path == '\0') return B_ENTRY_NOT_FOUND; - if (vnode == NULL) + if (vnode == NULL || path[0] == '/') return path_to_dir_vnode(path, _vnode, filename, kernel); status_t status = get_dir_path_and_leaf(path, filename);