added back up module store for non lfs support
This commit is contained in:
parent
1f88981112
commit
3824399f33
0
modpol_core/storage/store-modules-legacy.lua
Normal file
0
modpol_core/storage/store-modules-legacy.lua
Normal file
@ -1,4 +1,9 @@
|
|||||||
local lfs = require "lfs"
|
local lfs
|
||||||
|
-- checks if lua file system is installed
|
||||||
|
local using_lfs = pcall(function() lfs = require "lfs" end)
|
||||||
|
|
||||||
|
-- switches to legacy module loading if lfs is not available
|
||||||
|
if using_lfs then
|
||||||
|
|
||||||
-- loads file names to ignore into a table
|
-- loads file names to ignore into a table
|
||||||
function fetch_ignores(module_path)
|
function fetch_ignores(module_path)
|
||||||
@ -48,3 +53,7 @@ modpol.load_modules = function(module_path)
|
|||||||
end
|
end
|
||||||
print(loaded .. " modules loaded (" .. ignored .. " ignored)")
|
print(loaded .. " modules loaded (" .. ignored .. " ignored)")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
dofile (modpol.topdir .. "/store/sotre-modules-legacy.lua")
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user