Commit c642e4a3 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

open_object should return ERROR_FILE_NOT_FOUND when the named object

is not found.
parent df8cdfdf
......@@ -461,11 +461,16 @@ int open_object( const char *name, const struct object_ops *ops,
unsigned int access, int inherit )
{
struct object *obj = find_object( name );
if (!obj) return -1; /* FIXME: set error code */
if (!obj)
{
SET_ERROR( ERROR_FILE_NOT_FOUND );
return -1;
}
if (ops && obj->ops != ops)
{
release_object( obj );
return -1; /* FIXME: set error code */
SET_ERROR( ERROR_INVALID_HANDLE ); /* FIXME: not the right type */
return -1;
}
return alloc_handle( current->process, obj, access, inherit );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment