blackwinter / ruby-filemagic

Ruby bindings to the magic(4) library, revised.
https://blackwinter.github.iom/ruby-filemagic
146 stars 34 forks source link

Binary for empty file #12

Closed roman-wb closed 9 years ago

roman-wb commented 9 years ago

Hi

For blank text file (ex layout.liquid), method file return "inode/x-empty; charset=binary"

blackwinter commented 9 years ago

Please be more specific. What did you do? What did you get? What did you expect?

roman-wb commented 9 years ago

Created blank text file "layout.liquid" or "readme.txt" or "README"

fm = FileMagic.new(FileMagic::MAGIC_MIME)
fm.file('README') # "inode/x-empty; charset=binary"

It correct return method file?

ps sorry for my english

blackwinter commented 9 years ago

Yes, this is correct. Did you expect something else?

Compare the file command:

$ touch README
$ file -i README
README: inode/x-empty; charset=binary
roman-wb commented 9 years ago

I thought so true text/plain

Thank you very much realized his mistake