Runtime fix for csv files being recognized as application/x-ms-dos-executable when starting with MZ
This commit is contained in:
@@ -73,6 +73,14 @@ module Dunlop
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#FIXES
|
||||
|
||||
#A CSV FILE STARTING WITH MZ IS RECOGNIZED AS X-MS-DOS-EXECUTABLE
|
||||
# https://github.com/minad/mimemagic/issues/67
|
||||
if mime_magic_ms_dos_index = MimeMagic::MAGIC.index{|r| r == ['application/x-ms-dos-executable', [[0, 'MZ']]]}
|
||||
MimeMagic::MAGIC.delete_at(mime_magic_ms_dos_index)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user