From 46d0267dde6b179c8c5903d4a6a743d9d518e69f Mon Sep 17 00:00:00 2001 From: antlers Date: Sat, 26 Oct 2024 09:44:25 -0700 Subject: [PATCH] Override .org file extension to use text mimetype (*/* unrecognized on older devices) PR#2455 Prevents `QuickNote.org` from being filtered out of the QuickNote file-picking dialog. --- app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java b/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java index 30ee5aa22..87a9ebf9a 100644 --- a/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java +++ b/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java @@ -461,6 +461,8 @@ private static String gatherMimeType(final File file) { return "text/markdown"; } else if (ext.matches("(te?xt)|(taskpaper)")) { return "text/plain"; + } else if (ext.matches("org")) { + return "text/org"; } else if (ext.matches("webp")) { return "image/webp"; } else if (ext.matches("jpe?g")) {