nameFromType is advertised as being an "Array of mime types (Strings)".
addType inserts "mime types" into this array.
Actually, only three "mime types" are added, "dir", "binary", and "text".
Those are not mime types. We should change the occurrences of "mime type" in type.js to "type", and fs.js:138 should not set file.meta.type to type.nameFromType[file.type]. Mime types should instead be looked up properly.
This confusion causes all new mime types to be wrongly set to "binary" or "text" (however, in our logic "dir" is a valid mime type for folders, should we change that?), these problems surface in #188.
@espadrine in
type.js
:nameFromType
is advertised as being an "Array of mime types (Strings)".addType
inserts "mime types" into this array.Those are not mime types. We should change the occurrences of "mime type" in
type.js
to "type", andfs.js:138
should not setfile.meta.type
totype.nameFromType[file.type]
. Mime types should instead be looked up properly.This confusion causes all new mime types to be wrongly set to "binary" or "text" (however, in our logic "dir" is a valid mime type for folders, should we change that?), these problems surface in #188.