Skip to content

Commit

Permalink
Fixed problem opening text file with strange enconding
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp authored and philipp committed Jan 23, 2024
1 parent e904a4d commit 0ad0068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion odmf/webpage/filemanager/fileactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def check(self, path: Path):
from ...dataimport import ImportDescription
try:
descr = ImportDescription.from_file(path.absolute)
with path.to_pythonpath().open(encoding=descr.encoding or 'utf-8') as f:
with path.to_pythonpath().open('rb') as f:
f.read(100)
except IOError:
return False
Expand Down

0 comments on commit 0ad0068

Please sign in to comment.