_user_open_dir(): Allow a NULL path to be passed.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33973 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-11-10 10:51:08 +00:00
parent d6ac23c010
commit c3dbe62619
1 changed files with 3 additions and 0 deletions

View File

@ -8554,6 +8554,9 @@ _user_open_dir_entry_ref(dev_t device, ino_t inode, const char* userName)
int
_user_open_dir(int fd, const char* userPath)
{
if (userPath == NULL)
return dir_open(fd, NULL, false);
KPath path(B_PATH_NAME_LENGTH + 1);
if (path.InitCheck() != B_OK)
return B_NO_MEMORY;