Skip to content

Commit

Permalink
Cherry-pick write_bytes technique from gh-100586.
Browse files Browse the repository at this point in the history
  • Loading branch information
samety authored and jaraco committed Dec 28, 2022
1 parent f9d039d commit d623078
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions importlib_resources/_common.py
Expand Up @@ -203,6 +203,5 @@ def _write_contents(target, source):
for item in source.iterdir():
_write_contents(child, item)
else:
with child.open('wb') as fp:
fp.write(source.read_bytes())
child.write_bytes(source.read_bytes())
return child

0 comments on commit d623078

Please sign in to comment.