From 96836bb3dbc168d42805f9c0dbd5fbe2b16c0a36 Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Tue, 15 Sep 2015 01:28:44 +0300 Subject: [PATCH] Update ECSAPI.lua --- lib/ECSAPI.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ECSAPI.lua b/lib/ECSAPI.lua index a63e4c24..a464de7f 100644 --- a/lib/ECSAPI.lua +++ b/lib/ECSAPI.lua @@ -1668,8 +1668,11 @@ end function ECSAPI.formatHDD(address) local proxy = component.proxy(address) local list = proxy.list("") + ECSAPI.info("auto", "auto", "", "Formatting disk...") for _, file in pairs(list) do - if not proxy.isReadOnly(file) then proxy.remove(file) end + if type(file) == "string" then + if not proxy.isReadOnly(file) then proxy.remove(file) end + end end list = nil end