diff options
Diffstat (limited to 'src/gmutil.c')
-rw-r--r-- | src/gmutil.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gmutil.c b/src/gmutil.c index 971747d4..5be7e198 100644 --- a/src/gmutil.c +++ b/src/gmutil.c | |||
@@ -21,6 +21,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |||
21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | 21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ |
22 | 22 | ||
23 | #include "gmutil.h" | 23 | #include "gmutil.h" |
24 | #include "fontpack.h" | ||
24 | 25 | ||
25 | #include <the_Foundation/file.h> | 26 | #include <the_Foundation/file.h> |
26 | #include <the_Foundation/fileinfo.h> | 27 | #include <the_Foundation/fileinfo.h> |
@@ -511,7 +512,8 @@ const iString *findContainerArchive_Path(const iString *path) { | |||
511 | while (!isEmpty_String(path) && cmp_String(path, ".")) { | 512 | while (!isEmpty_String(path) && cmp_String(path, ".")) { |
512 | iString *dir = newRange_String(dirName_Path(path)); | 513 | iString *dir = newRange_String(dirName_Path(path)); |
513 | if (endsWithCase_String(dir, ".zip") || | 514 | if (endsWithCase_String(dir, ".zip") || |
514 | endsWithCase_String(dir, ".gpub")) { | 515 | endsWithCase_String(dir, ".gpub") || |
516 | endsWithCase_String(dir, ".fontpack")) { | ||
515 | iEndCollect(); | 517 | iEndCollect(); |
516 | return collect_String(dir); | 518 | return collect_String(dir); |
517 | } | 519 | } |
@@ -534,6 +536,9 @@ const char *mediaTypeFromFileExtension_String(const iString *d) { | |||
534 | else if (endsWithCase_String(d, ".gpub")) { | 536 | else if (endsWithCase_String(d, ".gpub")) { |
535 | return "application/gpub+zip"; | 537 | return "application/gpub+zip"; |
536 | } | 538 | } |
539 | else if (endsWithCase_String(d, ".fontpack")) { | ||
540 | return mimeType_FontPack; | ||
541 | } | ||
537 | else if (endsWithCase_String(d, ".xml")) { | 542 | else if (endsWithCase_String(d, ".xml")) { |
538 | return "text/xml"; | 543 | return "text/xml"; |
539 | } | 544 | } |
@@ -562,6 +567,7 @@ const char *mediaTypeFromFileExtension_String(const iString *d) { | |||
562 | return "audio/midi"; | 567 | return "audio/midi"; |
563 | } | 568 | } |
564 | else if (endsWithCase_String(d, ".txt") || | 569 | else if (endsWithCase_String(d, ".txt") || |
570 | endsWithCase_String(d, ".ini") || | ||
565 | endsWithCase_String(d, ".md") || | 571 | endsWithCase_String(d, ".md") || |
566 | endsWithCase_String(d, ".c") || | 572 | endsWithCase_String(d, ".c") || |
567 | endsWithCase_String(d, ".h") || | 573 | endsWithCase_String(d, ".h") || |