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

fix(common): use 64-bit API on Windows to get file sizes #11906

Merged
merged 5 commits into from
Jun 16, 2023

Conversation

HoraceBianchon
Copy link
Contributor

@HoraceBianchon HoraceBianchon commented Jun 16, 2023

For files with a size bigger than 2GB (32bit unsigned integer's max value) calculation based on the "::stat" function doesn't work correctly on the Windows operation systems.
I replaced the "::stat" function with "::stat64". For more details on the "::stat", please see link below

https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions?view=msvc-170


This change is Reviewable

@HoraceBianchon HoraceBianchon requested a review from a team as a code owner June 16, 2023 12:25
@google-cla
Copy link

google-cla bot commented Jun 16, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@coryan
Copy link
Contributor

coryan commented Jun 16, 2023

/gcbrun

@coryan
Copy link
Contributor

coryan commented Jun 16, 2023

Thanks for the PR! I made some changes to fit our coding style, I hope you don't mind.

@coryan coryan changed the title Corrected "file_size" calculation for files with sizes bigger than 2GB fix(common): "file_size" calculation for files with sizes bigger than 2GB Jun 16, 2023
@coryan coryan changed the title fix(common): "file_size" calculation for files with sizes bigger than 2GB fix(common): use 64-bit API on Windows to get file sizes Jun 16, 2023
@coryan coryan added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 16, 2023
@google-cloud-cpp-bot google-cloud-cpp-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 16, 2023
@coryan
Copy link
Contributor

coryan commented Jun 16, 2023

The changes look good, but we do need you to sign the CLA when you have a chance.

@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (dcc823e) 93.66% compared to head (9e20348) 93.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11906      +/-   ##
==========================================
- Coverage   93.66%   93.66%   -0.01%     
==========================================
  Files        1838     1838              
  Lines      166473   166475       +2     
==========================================
+ Hits       155931   155932       +1     
- Misses      10542    10543       +1     
Impacted Files Coverage Δ
google/cloud/internal/filesystem.cc 94.44% <100.00%> (+0.15%) ⬆️

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@coryan
Copy link
Contributor

coryan commented Jun 16, 2023

@HoraceBianchon at this point we are waiting for you to sign the CLA, once you do I will enable the builds again. There is no need to rebase or merge the changes from main.

@HoraceBianchon
Copy link
Contributor Author

The changes look good, but we do need you to sign the CLA when you have a chance.

I, mistakenly, committed with my corporate email.
And, now, I can't pass that signing.

@coryan
Copy link
Contributor

coryan commented Jun 16, 2023

/gcbrun

@coryan
Copy link
Contributor

coryan commented Jun 16, 2023

I requested an override and it was granted. Yay! 🎉 Now we wait for the builds to finish.

Thanks again for your contribution.

@coryan coryan added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 16, 2023
@google-cloud-cpp-bot google-cloud-cpp-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 16, 2023
@HoraceBianchon
Copy link
Contributor Author

Thanks

@coryan coryan merged commit b97556e into googleapis:main Jun 16, 2023
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.

3 participants