shell utils fixes

This commit is contained in:
kepler155c@gmail.com
2019-04-08 09:31:13 -04:00
parent fba1546213
commit a16510e254
3 changed files with 10 additions and 8 deletions

View File

@@ -5,11 +5,9 @@ local function get(path)
path = fs.getDir(path)
end
local label = fs.getDrive(path)
if label then
if fs.exists(path) then
local proxy = {
getLabel = function() return label end,
getLabel = function() return fs.getDrive(path) end,
isReadOnly = function() return fs.isReadOnly(path) end,
spaceTotal = function() return fs.getSize(path, true) + fs.getFreeSpace(path) end,
spaceUsed = function() return fs.getSize(path, true) end,