From 07e7c8ff40fcd19893c896447f7eecb9bc87401f Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Thu, 8 Oct 2015 22:23:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B8=D0=BD=D0=B8-=D1=83=D0=BB=D1=83?= =?UTF-8?q?=D1=87=D1=88=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20=D1=8F=D1=80=D0=BB=D1=8B?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2=20=D1=80=D0=B0=D0=B1=D0=BE=D1=87=D0=B5=D0=B3?= =?UTF-8?q?=D0=BE=20=D1=81=D1=82=D0=BE=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MineOS/OS.lua | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/MineOS/OS.lua b/MineOS/OS.lua index a2957d13..fbe9536e 100644 --- a/MineOS/OS.lua +++ b/MineOS/OS.lua @@ -351,6 +351,7 @@ local function createDesktopShortCuts() "Shop.app", "TetrisAlpha.app", "CodeDoor.app", + "Snake.app", } local dockApps = { @@ -362,17 +363,21 @@ local function createDesktopShortCuts() local desktopPath = "System/OS/Desktop/" local dockPath = "System/OS/Dock/" - if not fs.exists(desktopPath) then - fs.makeDirectory(desktopPath.."My files") - for i = 1, #apps do - ecs.createShortCut(desktopPath..ecs.hideFileFormat(apps[i])..".lnk", apps[i]) + + fs.makeDirectory(desktopPath .. "My files") + for i = 1, #apps do + local pathToShortcut = desktopPath .. ecs.hideFileFormat(apps[i]) .. ".lnk" + if not fs.exists(pathToShortcut) then + ecs.createShortCut(pathToShortcut, apps[i]) end + end - fs.remove(dockPath) - fs.makeDirectory(dockPath) + fs.makeDirectory(dockPath) - for i = 1, #dockApps do - ecs.createShortCut(dockPath..ecs.hideFileFormat(dockApps[i])..".lnk", dockApps[i]) + for i = 1, #dockApps do + local pathToShortcut = dockPath .. ecs.hideFileFormat(dockApps[i]) .. ".lnk" + if not fs.exists(pathToShortcut) then + ecs.createShortCut(pathToShortcut, dockApps[i]) end end end