Skip to content

Commit 961730b

Browse files
authored
Replace hex_erl_tar fork with OTP master's erl_tar (#165)
* Replace hex_erl_tar fork with OTP master's erl_tar Copy erl_tar.erl and erl_tar.hrl from OTP commit 013041bd68c2 with minimal modifications (module rename, include path, remove -doc/-moduledoc attributes for OTP 24 compatibility). This eliminates divergence from upstream. The fork's add/5 is replaced with OTP's add/4 using the {mode, Mode} option. hex_filename.erl is removed since filelib:safe_relative_path/2 is available since OTP 23. * Fix erl_tar rejecting safe symlinks with .. in target Join symlink targets with the symlink's parent directory before validating. Previously the raw target was validated in isolation, causing safe symlinks like dir/link -> ../file to be incorrectly rejected as unsafe. * Exclude generated files from formatting
1 parent def8883 commit 961730b

6 files changed

Lines changed: 301 additions & 263 deletions

File tree

rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{erlfmt, [
2828
write,
2929
{files, ["{src,test,examples}/*.{hrl,erl,app.src}", "rebar.config"]},
30-
{exclude_files, ["src/hex_pb_*.erl", "src/hex_erl_tar.{hrl,erl}"]}
30+
{exclude_files, ["src/hex_pb_*.erl", "src/hex_erl_tar.{hrl,erl}", "src/safe_erl_term.erl"]}
3131
]}.
3232

3333
{profiles, [

0 commit comments

Comments
 (0)