This seems to work. Perhaps cache in the future?

This commit is contained in:
gibbed 2014-01-20 07:40:57 -08:00
parent 8e5da8d853
commit 5a5a93d62d
1 changed files with 14 additions and 4 deletions

View File

@ -422,8 +422,18 @@ SHIM_CALL NtQueryInformationFile_shim(
case XFileXctdCompressionInformation:
// Read timeout.
if (length == 4) {
uint32_t magic;
size_t bytes_read;
result = file->Read(&magic, sizeof(magic), 0, &bytes_read);
if (XSUCCEEDED(result)) {
if (bytes_read == sizeof(magic)) {
info = 4;
SHIM_SET_MEM_32(file_info_ptr, 0); // TODO(gibbed): determine how we figure this out
SHIM_SET_MEM_32(file_info_ptr, magic == XESWAP32BE(0x0FF512ED));
}
else {
result = X_STATUS_UNSUCCESSFUL;
}
}
} else {
result = X_STATUS_INFO_LENGTH_MISMATCH;
}