Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make windows_file::stat return the same mtime as fs::stat #6708

Merged
merged 1 commit into from Oct 5, 2019

Conversation

rajkosto
Copy link
Contributor

@rajkosto rajkosto commented Oct 5, 2019

There's no reason these two functions should return different mtime on windows, and also ChangeTime cannot be influenced by fs_utime, only LastWriteTime can.

This fixes MGS4 disc versions always deleting stage dat files on boot because mtime doesnt match expected (set by fs_utime) on windows, forcing a chapter reinstall every boot.

@@ -966,7 +966,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
info.is_writable = (basic_info.FileAttributes & FILE_ATTRIBUTE_READONLY) == 0;
info.size = this->size();
info.atime = to_time(basic_info.LastAccessTime);
info.mtime = to_time(basic_info.ChangeTime);
info.mtime = to_time(basic_info.LastWriteTime);
info.ctime = info.mtime;
Copy link
Member

@MSuih MSuih Oct 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change ctime so that it still keeps using ChangeTime? The mtime change looks to be correct but ctime should still be ChangeTime in my opinion.

Edit: Or I guess not.

@Nekotekina Nekotekina merged commit 297e3c5 into RPCS3:master Oct 5, 2019
@ruthan
Copy link

ruthan commented Oct 5, 2019

Im not sure if it is same problem, but Conan also reinstallating with every execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants