Merge pull request #4501 from akallabeth/drive_file_size_fix

Removed xrdp workarounds.
This commit is contained in:
David Fort 2018-09-24 16:00:27 +02:00 committed by GitHub
commit ba69925b8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -332,11 +332,6 @@ DRIVE_FILE* drive_file_new(const WCHAR* base_path, const WCHAR* path, UINT32 Pat
return NULL;
}
if (DesiredAccess & 0x1000L)
{
DesiredAccess = (DesiredAccess & ~0x1000L) | GENERIC_WRITE;
}
file->file_handle = INVALID_HANDLE_VALUE;
file->find_handle = INVALID_HANDLE_VALUE;
file->id = id;
@ -620,8 +615,6 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN
return FALSE;
}
liSize.QuadPart = size & 0xFFFFFFFF;
if (!SetFilePointerEx(file->file_handle, liSize, NULL, FILE_BEGIN))
{
WLog_ERR(TAG, "Unable to truncate %s to %d (%"PRId32")", file->fullpath, size, GetLastError());