Skip to content

Commit

Permalink
Formats: Treat any XML based mime-type as text (PR gsantner#2130 by @…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsantner authored Oct 15, 2023
1 parent 426b92d commit 55188fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}

/**
Expand Down

0 comments on commit 55188fe

Please sign in to comment.