From 8e2cb8c4cad5fda4b9d8aa2a874a694ece1e92c3 Mon Sep 17 00:00:00 2001 From: Ale32bit Date: Tue, 1 Nov 2016 17:33:42 +0100 Subject: [PATCH] Update sPhone.lua --- src/sPhone.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/sPhone.lua b/src/sPhone.lua index 4a021ad..2379aed 100644 --- a/src/sPhone.lua +++ b/src/sPhone.lua @@ -806,16 +806,18 @@ end term.setTextColor(colors.white) term.clear() term.setCursorPos(1,1) - + local homePath = sPhone.getDefaultApp("home") if not sPhone.safeMode then - if fs.exists(sPhone.getDefaultApp("home")) then - shell.run(sPhone.getDefaultApp("home")) - else - shell.run("/.sPhone/apps/home") + if not fs.exists(homePath) then + homePath = "/.sPhone/apps/home" end else - shell.run("/.sPhone/apps/home") + homePath = "/.sPhone/apps/home" end + + temp.set("homePID",task.add(function() shell.run(homePath) end)) + task.run() + end sPhone.inHome = false end