diff options
author | John Högberg <john@erlang.org> | 2023-02-01 10:05:23 +0100 |
---|---|---|
committer | John Högberg <john@erlang.org> | 2023-02-01 10:05:23 +0100 |
commit | 46ce92bd3323d07693396c0f0003a1245d282dce (patch) | |
tree | c5ab64e7d9a903c3c33557fad4cac47ec5ab88ba | |
parent | 197801a62c1782bf18a294b21a709f1cf2ca2633 (diff) | |
parent | 5c07885c6b14f0017fd5b05f7caed529a0eb83aa (diff) | |
download | erlang-46ce92bd3323d07693396c0f0003a1245d282dce.tar.gz |
Merge branch 'file-info-alloc' into john/erts/merge-read_file_info-opt/PR-6716/OTP-18424
* file-info-alloc:
prim_file:read_file_info/2 avoid copying the record for posix time read
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index 3538b4fbba..29daf80229 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -653,6 +653,8 @@ read_handle_info_1(Fd, TimeType) -> error:_ -> {error, badarg} end. +adjust_times(FileInfo, posix) -> + FileInfo; adjust_times(FileInfo, TimeType) -> CTime = from_posix_seconds(FileInfo#file_info.ctime, TimeType), MTime = from_posix_seconds(FileInfo#file_info.mtime, TimeType), @@ -877,8 +879,6 @@ is_path_translatable(Path) -> %% We want to use posix time in all prim but erl_prim_loader makes that tricky %% It is probably needed to redo the whole erl_prim_loader -from_posix_seconds(Seconds, posix) when is_integer(Seconds) -> - Seconds; from_posix_seconds(Seconds, universal) when is_integer(Seconds) -> erlang:posixtime_to_universaltime(Seconds); from_posix_seconds(Seconds, local) when is_integer(Seconds) -> |