mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-09 15:25:56 -04:00
OpenOS: fix ls -l on Lua 5.4
This commit is contained in:
parent
9c95f10879
commit
34e1f1f131
@ -231,7 +231,7 @@ local function formatTime(epochms) -- from /lib/core/full_ls.lua
|
||||
if opts["full-time"] then
|
||||
return string.format("%s-%s-%s %s:%s:%s ", d.year, pad(nod(d.month)), pad(day), hour, min, sec)
|
||||
else
|
||||
return string.format("%s %+2s %+2s:%+2s ", month_names[d.month]:sub(1,3), day, hour, pad(min))
|
||||
return string.format("%s %2s %2s:%2s ", month_names[d.month]:sub(1,3), day, hour, pad(min))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- called from /init.lua
|
||||
local raw_loadfile = ...
|
||||
|
||||
_G._OSVERSION = "OpenOS 1.8.1"
|
||||
_G._OSVERSION = "OpenOS 1.8.2"
|
||||
|
||||
-- luacheck: globals component computer unicode _OSVERSION
|
||||
local component = component
|
||||
|
@ -139,7 +139,7 @@ local function formatDate(epochms)
|
||||
if ops["full-time"] then
|
||||
return string.format("%s-%s-%s %s:%s:%s ", d.year, pad(nod(d.month)), pad(day), hour, min, sec)
|
||||
else
|
||||
return string.format("%s %+2s %+2s:%+2s ", month_names[d.month]:sub(1,3), day, hour, pad(min))
|
||||
return string.format("%s %2s %2s:%2s ", month_names[d.month]:sub(1,3), day, hour, pad(min))
|
||||
end
|
||||
end
|
||||
|
||||
@ -222,7 +222,7 @@ local function display(names)
|
||||
local write_mode = info.fs.isReadOnly() and '-' or 'w'
|
||||
local size = formatSize(info.size)
|
||||
local modDate = formatDate(info.time)
|
||||
local format = "%s-r%s %+"..tostring(max_size_width).."s %"..tostring(max_date_width).."s"
|
||||
local format = "%s-r%s %"..tostring(max_size_width).."s %"..tostring(max_date_width).."s"
|
||||
local meta = string.format(format, file_type, write_mode, size, modDate)
|
||||
local item = info.name..link_target
|
||||
return {{name = meta}, {color = colorize(info), name = item}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user