Skip to content

Commit

Permalink
Merge pull request #22 from OscarLuu/bugfix_file_decoding
Browse files Browse the repository at this point in the history
bugfix base64 file decoding
  • Loading branch information
jehiah authored May 10, 2024
2 parents bba4642 + b7e2e43 commit 17979d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assetman/compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def replacer(match):
logging.debug('Not inlining %s (%.2fKB)', path, os.stat(path).st_size / KB)
return match.group(0)
else:
encoded = base64.b64encode(open(path).read())
encoded = base64.b64encode(open(path, 'rb').read())
mime_type, _ = mimetypes.guess_type(path)
if not mime_type and path.endswith('.otf'):
mime_type = 'application/octet-stream'
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ build-backend = "setuptools.build_meta"
[project]
name = "pyassetman"
description = "assetman assetmanager"
version = "0.3.0rc1"
version = "0.3.0rc2"
authors = [
{ name="Will McCutchen", email="[email protected]" },
]
maintainers = [
{ name="Jehiah Czebotar", email="[email protected]"},
{ name="Josh Harshman", email="[email protected]"}
{ name="Josh Harshman", email="[email protected]"},
{ name="Oscar Luu", email="[email protected]"}
]
readme = "README.md"
requires-python = ">=3.8"
Expand Down

0 comments on commit 17979d5

Please sign in to comment.