Skip to content

Commit

Permalink
always identify sh/bash as text mime type
Browse files Browse the repository at this point in the history
  • Loading branch information
sealexan committed Dec 2, 2024
1 parent cbc0dda commit e4a7394
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/ch/uzh/ifi/access/service/FileService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class FileService(val tika: Tika) {
fileData.mimeType = mimeType.toString()
// first, we trust the file extension, if we can recognize it
val extension = FileNameUtils.getExtension(path.toString())
if (listOf("py", "r").contains(extension.lowercase(Locale.getDefault()))) {
if (listOf("py", "r", "sh", "bash").contains(extension.lowercase(Locale.getDefault()))) {
fileData.content = Files.readString(path)
return fileData.validated()
}
Expand Down

0 comments on commit e4a7394

Please sign in to comment.