util.lua: fix lfs require in isEmptyDir()
Pointed out by @poire-z https://github.com/koreader/koreader/commit/ed7937f65d0891f54491be8f77f9864edaaad460#commitcomment-21956632
This commit is contained in:
1 parent
bb70ae9eaf
commit
ea9fa95a54
1 file changed
+2
-1
+2
-1
@@ -287,7 +287,8 @@ end
|
||||
---- @string path
|
||||
---- @treturn bool
|
||||
function util.isEmptyDir(path)
|
||||
for filename in require("lfs").dir(path) do
|
||||
local lfs = require("libs/libkoreader-lfs")
|
||||
for filename in lfs.dir(path) do
|
||||
if filename ~= '.' and filename ~= '..' then
|
||||
return false
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user