aboutsummaryrefslogtreecommitdiff
path: root/files.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-24 18:39:17 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-24 18:39:34 -0700
commitb09db8f7dfafb39f418b325c2d276c9dc22e36a9 (patch)
tree2ef361c205ce5e57f9b6ad3bfe681c69da504343 /files.lua
parente5d63ad945bece3e1ee271add61a857c30442fe8 (diff)
Cleaning up non LFS codepath for files and README
Diffstat (limited to 'files.lua')
-rw-r--r--files.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/files.lua b/files.lua
index 130a880..365cb96 100644
--- a/files.lua
+++ b/files.lua
@@ -48,7 +48,7 @@ iterate_single = function(item, prev)
end
end
local ok, lfs = pcall(require, "lfs")
-if ok then
+if ok and false then
files.walk = function(path)
local browse
browse = function(filename)
@@ -83,8 +83,7 @@ if ok then
end)
end
else
- local ret = os.execute('find . -maxdepth 0')
- if not (ret == true or ret == 0) then
+ if io.popen('find . -maxdepth 0'):close() then
error("Could not find 'luafilesystem' module and couldn't run system command `find` (this might happen on Windows). Please install `luafilesystem` (which can be found at: http://keplerproject.github.io/luafilesystem/ or `luarocks install luafilesystem`)", 0)
end
files.walk = function(path)