Update ECSAPI.lua

This commit is contained in:
Igor Timofeev 2015-09-15 01:28:44 +03:00
parent 256961e9fa
commit 96836bb3db

View File

@ -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