|
@@ -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
|
|
|
function fetch_ignores(module_path)
|
|
@@ -47,4 +52,8 @@ modpol.load_modules = function(module_path)
|
|
|
end
|
|
|
end
|
|
|
print(loaded .. " modules loaded (" .. ignored .. " ignored)")
|
|
|
+end
|
|
|
+
|
|
|
+else
|
|
|
+dofile (modpol.topdir .. "/store/sotre-modules-legacy.lua")
|
|
|
end
|