From 6ac67312aec04ec1b5f31dd822080f97cd29ec53 Mon Sep 17 00:00:00 2001 From: gamax92 Date: Tue, 25 Aug 2015 23:54:08 -0600 Subject: [PATCH] Cleanup boot.lua --- src/boot.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/boot.lua b/src/boot.lua index c485753..bb73588 100755 --- a/src/boot.lua +++ b/src/boot.lua @@ -49,8 +49,6 @@ local function boot() end end - local os_remove_leaf = os.remove - local recursiveDelete function recursiveDelete(path) local mode = lfs.attributes(path,"mode") @@ -64,11 +62,11 @@ local function boot() if mode == "directory" then recursiveDelete(path .. "/" .. entry) end - os_remove_leaf(path .. "/" .. entry) + os.remove(path .. "/" .. entry) end end end - return os_remove_leaf(path) + return os.remove(path) end elsa = { @@ -133,9 +131,9 @@ local function boot() } -- redirect os.remove is non posix - if os.getenv('os') == 'Windows_NT' then + if ffi.os == 'Windows' then local os_remove = os.remove - os_remove_leaf = function(path) + os.remove = function(path) local mode = lfs.attributes(path,"mode") if mode == nil then return false @@ -145,7 +143,6 @@ local function boot() return os_remove(path) end end - os.remove = elsa.remove end require("main")