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

epee: use std::filesystem::file_size to implement get_file_size #9514

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffro256
Copy link
Contributor

Fixes #9513

}
#endif
std::error_code ec;
size = static_cast<uint64_t>(std::filesystem::file_size(path_to_file, ec));
Copy link
Contributor

Choose a reason for hiding this comment

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

How many places is this called? Should we change uint64_t to std::uintmax_t here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would only really matter if we care about getting the size of a file bigger than 18 million terabytes. I think we're safe for a while...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But to be fair, it's only used in two places so it might be cleaner to just remove the epee wrapper altogether.

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

Successfully merging this pull request may close these issues.

[Bug Report] Windows, database_size field from get_info is 0
3 participants