From 568f58615a566f9a50f2b17e328d57321810bb24 Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 28 Dec 2022 18:38:22 -0700 Subject: [PATCH] Not all .hgt files are thought to be plaintext. Handle all .hgt files the same. --- wrolpi/files/lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrolpi/files/lib.py b/wrolpi/files/lib.py index 2e4dc69e..9aff5359 100644 --- a/wrolpi/files/lib.py +++ b/wrolpi/files/lib.py @@ -102,6 +102,8 @@ def _mimetype_suffix_map(path: Path, mimetype: str): suffix = path.suffix.lower() if mimetype == 'application/octet-stream' and suffix.endswith('.mobi'): return MOBI_MIMETYPE + if suffix.endswith('.hgt'): + return 'application/octet-stream' if mimetype == 'text/plain': if suffix.endswith('.json'): return 'application/json' @@ -123,8 +125,6 @@ def _mimetype_suffix_map(path: Path, mimetype: str): return 'text/srt' if suffix.endswith('.yaml') or suffix.endswith('.yml'): return 'text/yaml' - if suffix.endswith('.hgt'): - return 'application/octet-stream' return mimetype