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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Utilities/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.


if (info.atime < info.mtime)
Expand Down