Commit e21adbf4 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

ole32: Fix return code of DeleteStorage for read only storage.

parent 93a15538
......@@ -1797,6 +1797,9 @@ static HRESULT WINAPI StorageImpl_DestroyElement(
if (pwcsName==NULL)
return STG_E_INVALIDPOINTER;
if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ )
return STG_E_ACCESSDENIED;
/*
* Create a property enumeration to search the property with the given name
*/
......
......@@ -1328,11 +1328,11 @@ void test_readonly(void)
/* DestroyElement on read-only storage, name exists */
hr = IStorage_DestroyElement( stg2, streamW );
todo_wine ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr);
ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr);
/* DestroyElement on read-only storage, name does not exist */
hr = IStorage_DestroyElement( stg2, storageW );
todo_wine ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr);
ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr);
IStorage_Release(stg2);
}
......
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