From 4ed6db9faaa9614489b0b724a0640792cc3fc454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 22 Jun 2020 19:44:45 +0800 Subject: =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/workspace.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'script/workspace.lua') diff --git a/script/workspace.lua b/script/workspace.lua index 88d29431..8a7e4139 100644 --- a/script/workspace.lua +++ b/script/workspace.lua @@ -201,12 +201,10 @@ end function mt:isLuaFile(path) local pathStr = path:string() for k, v in pairs(config.other.associations) do - k = k:gsub('^%*', '') - if self:fileNameEq(pathStr:sub(-#k), k) then - if v == 'lua' then + if v == 'lua' then + k = k:gsub('^%*', '') + if self:fileNameEq(pathStr:sub(-#k), k) then return true - else - return false end end end -- cgit v1.2.3