Skip to content

Commit

Permalink
Merge branch 'lukas/stdlib/zip64/OTP-19214' into maint
Browse files Browse the repository at this point in the history
* lukas/stdlib/zip64/OTP-19214: (21 commits)
  erts: Polish open_port env opts documentation
  zip: Cleanup testcases to be simpler and more stable
  zip: Do not fallback to dostime for ctime
  zip: Add skip_directories option
  zip: Polish documentation
  zip: zlib can already have been closed
  zip: Increase size printout for zip:tt to suite zip64
  zip: Fix zip STORE to work with > 4GB files on Windows
  zip: Implement zip64 support
  zip: Add support for UNIX3 (aka uid and gid) extra attribute
  zip: Implement extended timestamps
  zip: Add test for external attributes mode handling
  zip: Add basic timestamp test
  zip: Polish test suite
  zip: Write external attributes to disk when creating files
  zip: Correctly encode Unix external attributes in zip files
  zip: List dir now returns directories
  zip: The mod time should be in local_time
  zip: Fix zip:foldl to not use prim_zip
  zip: Fix dos date time convertion of seconds
  ...
  • Loading branch information
garazdawi committed Sep 2, 2024
2 parents d3a9459 + efc2de2 commit c5cd8ee
Show file tree
Hide file tree
Showing 5 changed files with 1,930 additions and 690 deletions.
Binary file modified erts/preloaded/ebin/prim_zip.beam
Binary file not shown.
23 changes: 10 additions & 13 deletions erts/preloaded/src/erlang.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7128,20 +7128,17 @@ follows:
`{spawn_executable, FileName}`. The external program starts using `Dir` as its
working directory. `Dir` must be a string.
- **`{env, Env}`** - Types:
  `Name = ``t:os:env_var_name/0`
  `Val = ``t:os:env_var_value/0`` | false`
  `Env = [{Name, Val}]`
Only valid for `{spawn, Command}`, and `{spawn_executable, FileName}`. The
environment of the started process is extended using the environment
- **`{env, Env}`** - Only valid for `{spawn, Command}`, and `{spawn_executable, FileName}`.
The environment of the started process is extended using the environment
specifications in `Env`.
`Env` is to be a list of tuples `{Name, Val}`, where `Name` is the name of an
environment variable, and `Val` is the value it is to have in the spawned port
process. Both `Name` and `Val` must be strings. The one exception is `Val`
being the atom `false` (in analogy with `os:getenv/1`), which removes the
environment variable.
`Env` is to be a list of tuples `{Name, Val}`, where `Name` is a `t:os:env_var_name/0`
representing the name of an environment variable, and `Val` is a `t:os:env_var_name/0`
representing the value it is to have in the spawned port process. Both `Name` and `Val` must
be strings.
If `Val` is set to the atom `false` or the empty string (that is `""` or `[]`), open_port
will consider those variables unset just as if `os:unsetenv/1` had been called.
For information about encoding requirements, see documentation of the types
for `Name` and `Val`.
Expand Down Expand Up @@ -7327,7 +7324,7 @@ by passing command-line flag [`+Q`](erl_cmd.md#max_ports) to [erl](erl_cmd.md).
| stream
| {line, L :: non_neg_integer()}
| {cd, Dir :: string() | binary()}
| {env, Env :: [{Name :: os:env_var_name(), Val :: os:env_var_value() | false}]}
| {env, Env :: [{Name :: os:env_var_name(), Val :: os:env_var_value() | [] | false}]}
| {args, [string() | binary()]}
| {arg0, string() | binary()}
| exit_status
Expand Down
2 changes: 1 addition & 1 deletion erts/preloaded/src/prim_zip.erl
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ dos_date_time_to_datetime(DosDate, DosTime) ->
<<Hour:5, Min:6, Sec:5>> = <<DosTime:16>>,
<<YearFrom1980:7, Month:4, Day:5>> = <<DosDate:16>>,
{{YearFrom1980+1980, Month, Day},
{Hour, Min, Sec}}.
{Hour, Min, Sec * 2}}.

cd_file_header_from_bin(<<VersionMadeBy:16/little,
VersionNeeded:16/little,
Expand Down
Loading

0 comments on commit c5cd8ee

Please sign in to comment.