Module function magic.from_file returns different result in Windows and Centos

67 Views Asked by At

The from_file in python package python-magic returns different results for the same file in Windows vs Centos.

For e.g on Windows,

from magic import from_file
print(from_file("path\to\file_name.msi", mime=True))

# Below is the output
application/x-msi

on Centos

from magic import from_file
print(from_file("path/to/file_name.msi", mime=True))

# Below is the output
application/msword
0

There are 0 best solutions below