mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-22 23:31:05 +00:00
fix: skip when the mime-type cannot match due to file permissions (#725)
This commit is contained in:
parent
5e43f878c6
commit
b4d91df767
1 changed files with 5 additions and 3 deletions
|
|
@ -1,9 +1,11 @@
|
|||
local SUPPORTED_TYPES = "application/audio/biosig/chemical/font/image/inode/message/model/rinex/text/vector/video/x-epoc/"
|
||||
|
||||
local M = {}
|
||||
|
||||
local function match_mimetype(s)
|
||||
local type, subtype = s:match("([-a-z]+/)([+-.a-zA-Z0-9]+)%s*$")
|
||||
if string.find("application/audio/biosig/chemical/font/image/inode/message/model/rinex/text/vector/video/x-epoc/", type, 1, true) then
|
||||
return type .. subtype
|
||||
local type, sub = s:match("([-a-z]+/)([+-.a-zA-Z0-9]+)%s*$")
|
||||
if type and sub and string.find(SUPPORTED_TYPES, type, 1, true) then
|
||||
return type .. sub
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue