jborean93 / smbprotocol

Python SMBv2 and v3 Client
MIT License
320 stars 73 forks source link

Shutil.copyfile will open source with read share #265

Closed jborean93 closed 8 months ago

jborean93 commented 8 months ago

Opens the source file used in shutil.copyfile with share_access="r" to ensure that it can be copied even if something else already has it opened with read access and grants further opens.

Fixes: https://github.com/jborean93/smbprotocol/issues/258

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4e69397) 99.06% compared to head (2069a12) 98.98%. Report is 1 commits behind head on master.

:exclamation: Current head 2069a12 differs from pull request most recent head 6dc5e36. Consider uploading reports for the commit 6dc5e36 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #265 +/- ## ========================================== - Coverage 99.06% 98.98% -0.08% ========================================== Files 24 24 Lines 5115 5116 +1 ========================================== - Hits 5067 5064 -3 - Misses 48 52 +4 ``` | [Flag](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.98% <100.00%> (-0.08%)` | :arrow_down: | | [py3.10](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.94% <100.00%> (-0.08%)` | :arrow_down: | | [py3.11](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.94% <100.00%> (-0.08%)` | :arrow_down: | | [py3.12](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.94% <100.00%> (-0.08%)` | :arrow_down: | | [py3.7](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.93% <100.00%> (-0.08%)` | :arrow_down: | | [py3.8](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.94% <100.00%> (-0.08%)` | :arrow_down: | | [py3.9](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.98% <100.00%> (-0.08%)` | :arrow_down: | | [x64](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.98% <100.00%> (-0.08%)` | :arrow_down: | | [x86](https://app.codecov.io/gh/jborean93/smbprotocol/pull/265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.90% <100.00%> (-0.08%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.