Merge pull request #5318 from akallabeth/filetime_fix

Fix #5317: Change file attributes before modifying file time.
This commit is contained in:
David Fort 2019-04-04 18:06:22 +02:00 committed by GitHub
commit 39f7486211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -590,13 +590,13 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN
DEBUG_WSTR("SetFileTime %s", file->fullpath);
SetFileAttributesW(file->fullpath, FileAttributes);
if (!SetFileTime(file->file_handle, pftCreationTime, pftLastAccessTime, pftLastWriteTime))
{
WLog_ERR(TAG, "Unable to set file time to %s", file->fullpath);
return FALSE;
}
SetFileAttributesW(file->fullpath, FileAttributes);
break;
case FileEndOfFileInformation: