From 55188fe3094510fab82709e5a124bc65a0b528db Mon Sep 17 00:00:00 2001 From: Gregor Santner Date: Sun, 15 Oct 2023 16:25:46 +0000 Subject: [PATCH] Formats: Treat any XML based mime-type as text (PR #2130 by @gsantner) --- app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 271b94ba00..43c952d864 100644 --- a/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java +++ b/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java @@ -499,7 +499,7 @@ public static String getMimeType(final File file) { public static boolean isTextFile(File file) { final String mime = getMimeType(file); - return mime != null && mime.startsWith("text/"); + return mime != null && (mime.startsWith("text/") || mime.contains("xml")); } /**