v1.14.1 - Small tweak to the import function mistakenly not finding files.

This commit is contained in:
TheWahlolly
2025-07-02 12:38:52 +03:00
parent fb4c80f3a0
commit 5ecf1fa4af
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
local agcfg = {
["halyde"] = {
["maindir"] = "",
["version"] = "1.14.0",
["version"] = "1.14.1",
["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.",
["directories"] = {
"halyde/apps",
+3 -5
View File
@@ -1,7 +1,7 @@
local loadfile = ...
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
_G._OSVERSION = "Halyde 1.14.0"
_G._OSVERSION = "Halyde 1.14.1"
_G._OSLOGO = ""
local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil
repeat
@@ -19,10 +19,8 @@ function _G.import(module, ...)
return package.preloaded[module]
end
local modulepath
if module:find("^/") then
if filesystem.exists(module) then
modulepath = module
end
if filesystem.exists(module) then
modulepath = module
elseif filesystem.exists("/halyde/lib/"..module..".lua") then
modulepath = "/halyde/lib/"..module..".lua"
elseif shell and shell.workingDirectory and filesystem.exists(shell.workingDirectory..module) then