mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-24 16:21:04 +00:00
fix: os.date only accepts integer in Lua 5.4
This commit is contained in:
parent
2d3512e965
commit
bfa5e0af0c
1 changed files with 2 additions and 1 deletions
|
|
@ -57,7 +57,8 @@ function Folder:linemode(area)
|
|||
local size = f:size()
|
||||
spans[#spans + 1] = ui.Span(size and ya.readable_size(size) or "")
|
||||
elseif mode == "mtime" then
|
||||
spans[#spans + 1] = ui.Span(os.date("%y-%m-%d %H:%M", f.cha.modified))
|
||||
local time = f.cha.modified
|
||||
spans[#spans + 1] = ui.Span(time and os.date("%y-%m-%d %H:%M", time // 1) or "")
|
||||
elseif mode == "permissions" then
|
||||
spans[#spans + 1] = ui.Span(f.cha:permissions() or "")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue