From fe6cd4cd727603681caf1fdf99ea56518f20eb0e Mon Sep 17 00:00:00 2001 From: Ponali Date: Wed, 23 Jul 2025 16:31:58 +0200 Subject: [PATCH] v2.7.1 - Fixed a bug where drivers wouldn't load, and listing /special/drive would return an error when a Computers tape drive is connected The startupapps.json config file didn't have drvload.lua when recently installing Halyde. component.list("drive") will not just list components with the 'drive' type, but also with types that contain 'drive'. this includes 'tape_drive' (Computronics), so when calling getCapacity, the filesystem library errors out. --- argentum.cfg | 2 +- halyde/config/generate/startupapps.json | 2 +- halyde/core/boot.lua | 2 +- halyde/lib/filesystem.lua | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/argentum.cfg b/argentum.cfg index 82da2f0..6074b26 100644 --- a/argentum.cfg +++ b/argentum.cfg @@ -1,7 +1,7 @@ local agcfg = { ["halyde"] = { ["maindir"] = "", - ["version"] = "2.7.0", + ["version"] = "2.7.1", ["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.", ["directories"] = { "halyde/apps", diff --git a/halyde/config/generate/startupapps.json b/halyde/config/generate/startupapps.json index d5955d9..5609ad6 100644 --- a/halyde/config/generate/startupapps.json +++ b/halyde/config/generate/startupapps.json @@ -1 +1 @@ -["/halyde/core/fullkb.lua","/halyde/core/evmgr.lua","/halyde/core/shell.lua"] +["/halyde/core/fullkb.lua","/halyde/core/evmgr.lua","/halyde/core/drvload.lua","/halyde/core/shell.lua"] diff --git a/halyde/core/boot.lua b/halyde/core/boot.lua index 9769bdf..f162c9d 100644 --- a/halyde/core/boot.lua +++ b/halyde/core/boot.lua @@ -1,7 +1,7 @@ local loadfile = ... local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile) -_G._OSVERSION = "Halyde 2.7.0" +_G._OSVERSION = "Halyde 2.7.1" _G._OSLOGO = "" local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil repeat diff --git a/halyde/lib/filesystem.lua b/halyde/lib/filesystem.lua index 6fd26f6..cbdd325 100644 --- a/halyde/lib/filesystem.lua +++ b/halyde/lib/filesystem.lua @@ -304,8 +304,8 @@ function filesystem.list(path) elseif path == "/special/drive" then local returnTable = {} local tmpAddress = computer.tmpAddress() - for address, _ in component.list("drive") do - if address~=tmpAddress then + for address, type in component.list("drive") do + if address~=tmpAddress and type=="drive" then table.insert(returnTable, address:sub(1, 3)) end end