删除不必要的拓展名
This commit is contained in:
@@ -30,37 +30,11 @@ local function log(msg)
|
||||
--basalt.debug("[FileClient] " .. tostring(msg))
|
||||
end
|
||||
|
||||
-- 改进的二进制检测函数,增加对DFPWM等特定格式的支持
|
||||
|
||||
local function isBinaryFile(path)
|
||||
local extension = string.lower(string.match(path, "%.([^%.%s]+)$") or "")
|
||||
local binaryExtensions = {
|
||||
["wav"] = true,
|
||||
["mp3"] = true,
|
||||
["ogg"] = true,
|
||||
["flac"] = true,
|
||||
["dfpwm"] = true,
|
||||
["png"] = true,
|
||||
["jpg"] = true,
|
||||
["jpeg"] = true,
|
||||
["gif"] = true,
|
||||
["bmp"] = true,
|
||||
["ico"] = true,
|
||||
["exe"] = true,
|
||||
["dll"] = true,
|
||||
["so"] = true,
|
||||
["bin"] = true,
|
||||
["dat"] = true,
|
||||
["zip"] = true,
|
||||
["rar"] = true,
|
||||
["tar"] = true,
|
||||
["gz"] = true,
|
||||
["pdf"] = true,
|
||||
["doc"] = true,
|
||||
["docx"] = true,
|
||||
["xls"] = true,
|
||||
["xlsx"] = true,
|
||||
["ppt"] = true,
|
||||
["pptx"] = true
|
||||
}
|
||||
|
||||
if binaryExtensions[extension] then
|
||||
|
||||
Reference in New Issue
Block a user