Wrong mimetype for .epub files
Brought to you by:
zc2
Hello.
Trying to open a .epub file with FBReader always fails with an error message of something like:
"application to open blah.epub is not available"
I have to use "Open With" every time I want to open an epub with FBReader.
Looking at the source code of Ghose Commander I see that the mimetype of .epub is defined as "application/epub"; changing that to "application/epub+zip" fixes the issue.
Index: src/com/ghostsq/commander/utils/Utils.java
===================================================================
--- src/com/ghostsq/commander/utils/Utils.java (revision 556)
+++ src/com/ghostsq/commander/utils/Utils.java (working copy)
@@ -61,7 +61,7 @@
{ ".djvu", "image/vnd.djvu", C_IMAGE },
{ ".doc", "application/msword", C_OFFICE },
{ ".docx", "application/msword", C_OFFICE },
- { ".epub", "application/epub", C_BOOK },
+ { ".epub", "application/epub+zip", C_BOOK },
{ ".fb2", "application/fb2", C_BOOK },
{ ".flac", "audio/flac", C_AUDIO },
{ ".flv", "video/x-flv", C_VIDEO },
@@ -805,4 +805,4 @@
return r;
}
};
-}
\ No newline at end of file
+}
AFAIK the correct mimetype for .epub files is "application/epub+zip"; according to these sources anyway:
http://www.idpf.org/epub/301/spec/epub-ocf.html#app-media-type
https://en.wikipedia.org/wiki/EPUB
Thanks in advance.
Thank you for the patch, it is applied in the latest version
https://sourceforge.net/projects/ghostcommander/files/Betas/Ghost%20Commander%201.53.7b2.apk/download