Posted 22 July 2018 - 07:24 AM
So I am trying to do a 'sanity' check before the program continues, the only problem is that when I attempt to run it, it seems like it completely skips the check, I don't know what I'm doing wrong… Any help?
Code:
Code:
local CHECKDIRS = {
"fs.exists('/SparkOS/boot/')",
"fs.exists('/SparkOS/home/')",
"fs.exists('/SparkOS/media/')",
"fs.exists('/SparkOS/programs/')",
"fs.exists('/SparkOS/system/')"
}
for i=1,#CHECKDIRS do
if not CHECKDIRS[i] then
term.clear()
print("HEY! The folder exists check failed on the following folder!")
print("Command: "..CHECKDIRS[i]..".")
sleep(1)
FAILED = true
end
if FAILED == true then
print("Please fix the reported problems before booting SparkOS!")
sleep(1)
end
end