_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:
@@ -8554,6 +8554,9 @@ _user_open_dir_entry_ref(dev_t device, ino_t inode, const char* userName)
|
|||||||
int
|
int
|
||||||
_user_open_dir(int fd, const char* userPath)
|
_user_open_dir(int fd, const char* userPath)
|
||||||
{
|
{
|
||||||
|
if (userPath == NULL)
|
||||||
|
return dir_open(fd, NULL, false);
|
||||||
|
|
||||||
KPath path(B_PATH_NAME_LENGTH + 1);
|
KPath path(B_PATH_NAME_LENGTH + 1);
|
||||||
if (path.InitCheck() != B_OK)
|
if (path.InitCheck() != B_OK)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|||||||
Reference in New Issue
Block a user