v1.14.1 - Small tweak to the import function mistakenly not finding files.
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
local agcfg = {
|
local agcfg = {
|
||||||
["halyde"] = {
|
["halyde"] = {
|
||||||
["maindir"] = "",
|
["maindir"] = "",
|
||||||
["version"] = "1.14.0",
|
["version"] = "1.14.1",
|
||||||
["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.",
|
["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.",
|
||||||
["directories"] = {
|
["directories"] = {
|
||||||
"halyde/apps",
|
"halyde/apps",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
local loadfile = ...
|
local loadfile = ...
|
||||||
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
|
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
|
||||||
|
|
||||||
_G._OSVERSION = "Halyde 1.14.0"
|
_G._OSVERSION = "Halyde 1.14.1"
|
||||||
_G._OSLOGO = ""
|
_G._OSLOGO = ""
|
||||||
local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil
|
local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil
|
||||||
repeat
|
repeat
|
||||||
@@ -19,10 +19,8 @@ function _G.import(module, ...)
|
|||||||
return package.preloaded[module]
|
return package.preloaded[module]
|
||||||
end
|
end
|
||||||
local modulepath
|
local modulepath
|
||||||
if module:find("^/") then
|
if filesystem.exists(module) then
|
||||||
if filesystem.exists(module) then
|
modulepath = module
|
||||||
modulepath = module
|
|
||||||
end
|
|
||||||
elseif filesystem.exists("/halyde/lib/"..module..".lua") then
|
elseif filesystem.exists("/halyde/lib/"..module..".lua") then
|
||||||
modulepath = "/halyde/lib/"..module..".lua"
|
modulepath = "/halyde/lib/"..module..".lua"
|
||||||
elseif shell and shell.workingDirectory and filesystem.exists(shell.workingDirectory..module) then
|
elseif shell and shell.workingDirectory and filesystem.exists(shell.workingDirectory..module) then
|
||||||
|
|||||||
Reference in New Issue
Block a user