ferron

Ferron is a fast and simple static website generator made with Lua.
Log | Files | Refs | Submodules | README | LICENSE

commit 889a9b6041a5de40b842be1add05c7ae4b9bf6c1
parent 0fc7fe8ec22e64adb8c5ff3bde828f25b0cc98f0
Author: Hugo Soucy <hsoucy@kronostechnologies.com>
Date:   Tue,  5 Feb 2019 08:06:02 -0500

Refactor the isDirectory method

Diffstat:
Mferron/utilities/file-utils.lua | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ferron/utilities/file-utils.lua b/ferron/utilities/file-utils.lua @@ -27,9 +27,9 @@ function fileutils.isFile(filepath) end function fileutils.isDirectory(filepath) - if lfs.attributes(filepath) == nil then - return false - elseif lfs.attributes(filepath).mode == "directory" then + if lfs.attributes(filepath) + and lfs.attributes(filepath).mode == "directory" + then return filepath end