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 = { 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 -3
View File
@@ -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