Skip to content

Commit

Permalink
switch ignoreT to s_ignoreT and defaultT to s_defaultT
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Aug 9, 2024
1 parent 4c8ca8d commit 0cf26a3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/DirTree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ end

local load = (_VERSION == "Lua 5.1") and loadstring or load

local ignoreT = {
local s_ignoreT = {
['.'] = true,
['..'] = true,
['.git'] = true,
Expand All @@ -68,7 +68,7 @@ local ignoreT = {
['.DS_Store'] = true,
}

local defaultFnT = {
local s_defaultFnT = {
default = 1,
['.modulerc.lua'] = 2,
['.modulerc'] = 3,
Expand All @@ -80,7 +80,7 @@ local function l_keepFile(fn)
local lastChar = fn:sub(-1,-1)
local firstTwo = fn:sub(1,2)

local result = not (ignoreT[fn] or lastChar == '~' or firstChar == '#' or
local result = not (s_ignoreT[fn] or lastChar == '~' or firstChar == '#' or
lastChar == '#' or firstTwo == '.#' or firstTwo == '__')
if (not result) then
return false
Expand All @@ -90,7 +90,7 @@ local function l_keepFile(fn)
return false
end

if (defaultFnT[fn]) then
if (s_defaultFnT[fn]) then
return true
end

Expand Down Expand Up @@ -192,7 +192,7 @@ local function l_walk(mrc, mpath, path, dirA, fileT, regularFn)
if (kind == "directory" and f ~= "." and f ~= "..") then
dirA[#dirA + 1 ] = file
elseif (kind == "file" or kind == "link") then
local dfltIdx = defaultFnT[f]
local dfltIdx = s_defaultFnT[f]
local fullName = extractFullName(mpath, file)
if (dfltIdx) then
local luaExt = f:find("%.lua$")
Expand Down

0 comments on commit 0cf26a3

Please sign in to comment.