msi: Clone an open stream if possible in cabinet_open_stream.
This commit is contained in:
parent
4f9971f5f8
commit
3f7312fdc1
|
@ -235,6 +235,8 @@ static INT_PTR CDECL cabinet_open_stream( char *pszFile, int oflag, int pmode )
|
||||||
WARN("failed to encode stream name\n");
|
WARN("failed to encode stream name\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (msi_clone_open_stream( package_disk.package->db, cab->storage, encoded, &stream ) != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
hr = IStorage_OpenStream( cab->storage, encoded, NULL, STGM_READ|STGM_SHARE_EXCLUSIVE, 0, &stream );
|
hr = IStorage_OpenStream( cab->storage, encoded, NULL, STGM_READ|STGM_SHARE_EXCLUSIVE, 0, &stream );
|
||||||
msi_free( encoded );
|
msi_free( encoded );
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
|
@ -242,6 +244,8 @@ static INT_PTR CDECL cabinet_open_stream( char *pszFile, int oflag, int pmode )
|
||||||
WARN("failed to open stream 0x%08x\n", hr);
|
WARN("failed to open stream 0x%08x\n", hr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
msi_free( encoded );
|
||||||
return (INT_PTR)stream;
|
return (INT_PTR)stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue