Skip to content

Commit

Permalink
Fix ls.lua timestamp
Browse files Browse the repository at this point in the history
filesystem.lastModied returns timestamp as milliseconds but os.date using it as seconds, so files modification date was shown wrong
  • Loading branch information
Smok1e committed Sep 15, 2022
1 parent 9efc6d8 commit 7a976b3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ local function stat(path, name)
info.sort_name = info.name:gsub("^%.","")
info.isLink, info.link = fs.isLink(info.full_path)
info.size = info.isLink and 0 or fs.size(info.full_path)
info.time = fs.lastModified(info.full_path)
info.time = fs.lastModified(info.full_path)/1000
info.fs = fs.get(info.full_path)
info.ext = info.name:match("(%.[^.]+)$") or ""
return info
Expand Down

0 comments on commit 7a976b3

Please sign in to comment.