Skip to content

Commit

Permalink
Disallow treating openxml (msword) files as textfiles, closes gsantne…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsantner committed May 21, 2024
1 parent 3120d97 commit cef4068
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 @@ -524,7 +524,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/") || mime.contains("xml"));
return mime != null && (mime.startsWith("text/") || mime.contains("xml")) && !mime.contains("openxml");
}

/**
Expand Down

0 comments on commit cef4068

Please sign in to comment.