Skip to content

Commit 8519a50

Browse files
authored
Make miniOS chainloader tool more reliable.
It didn't check if the file to chainload existed...
1 parent 6e0ac42 commit 8519a50

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

miniOS/chain.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ miniOS will probably be broken.]])
3838
return
3939
end
4040

41+
if not filesystem.exists(td .. ":" .. tf) then
42+
printErr("File to chainload `" .. td .. ":" .. tf .. "` does not exist!")
43+
return
44+
end
45+
4146
term.clear()
4247
error({[1]="INTERRUPT", [2]="RUN", [3]=(td .. ":" .. tf), [4]=targs or {}})
4348

0 commit comments

Comments
 (0)