From 3a2b36690dc3a8ac56552353125461e8979cce60 Mon Sep 17 00:00:00 2001 From: Ale32bit Date: Tue, 10 Nov 2015 20:53:44 +0100 Subject: [PATCH] Update sPhone.lua --- src/sPhone.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sPhone.lua b/src/sPhone.lua index ee32a53..ebe807c 100644 --- a/src/sPhone.lua +++ b/src/sPhone.lua @@ -52,9 +52,19 @@ local function recovery() while true do local _, k = os.pullEvent("key") if k == 2 then + term.setBackgroundColor(colors.black) + term.setTextColor(colors.white) for k, v in pairs(fs.list("/")) do if not fs.isReadOnly(v) then + if fs.isDir(v) then + shell.setDir(v) + for k, v in pairs(fs.list("/"..v)) do + fs.delete(v) + print("Removed "..shell.dir().."/"..v) + end + end fs.delete(v) + print("Removed "..v) end end print("Installing sPhone...")