Fixing mime-type recognition in dumped values

This commit is contained in:
Miroslav Štampar 2026-06-04 21:25:20 +02:00
parent 10282a3993
commit 249d2a6cbb
3 changed files with 4 additions and 4 deletions

View file

@ -623,7 +623,7 @@ class Dump(object):
if len(value) > MIN_BINARY_DISK_DUMP_SIZE and r'\x' in value:
try:
mimetype = getText(magic.from_buffer(value, mime=True))
mimetype = getText(magic.from_buffer(getBytes(value), mime=True))
if any(mimetype.startswith(_) for _ in ("application", "image")):
if not os.path.isdir(dumpDbPath):
os.makedirs(dumpDbPath)