Merge pull request #5194 from akallabeth/drive_file_size_fix2

Fixed #5185 broken file size initialization.
This commit is contained in:
David Fort 2019-01-14 23:25:26 +01:00 committed by GitHub
commit ac0c91300b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -615,6 +615,8 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN
return FALSE;
}
liSize.QuadPart = size;
if (!SetFilePointerEx(file->file_handle, liSize, NULL, FILE_BEGIN))
{
WLog_ERR(TAG, "Unable to truncate %s to %d (%"PRId32")", file->fullpath, size, GetLastError());