aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-02-16 15:14:50 +0100
committerGitHub <[email protected]>2017-02-16 15:14:50 +0100
commitdbf3754567fdc97a53da529e04400602c647ee7e (patch)
tree40a8f9f448b985b7924cf5d1785707cb4a80e57c /lib/sasl/src
parentec84b5f05e3daa633c98b00243a52acd9620d586 (diff)
parentaa0c4b0df7cdc750450906aff4e8c81627d80605 (diff)
downloadotp-dbf3754567fdc97a53da529e04400602c647ee7e.tar.gz
otp-dbf3754567fdc97a53da529e04400602c647ee7e.tar.bz2
otp-dbf3754567fdc97a53da529e04400602c647ee7e.zip
Merge pull request #1323 from bitwalker/erl_tar2
Update erl_tar to support PAX format (redux) OTP-14226
Diffstat (limited to 'lib/sasl/src')
-rw-r--r--lib/sasl/src/release_handler.erl6
-rw-r--r--lib/sasl/src/systools_make.erl4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl
index 1fcc9a0288..3250311b8f 100644
--- a/lib/sasl/src/release_handler.erl
+++ b/lib/sasl/src/release_handler.erl
@@ -831,7 +831,7 @@ do_unpack_release(Root, RelDir, ReleaseName, Releases) ->
Tar = filename:join(RelDir, ReleaseName ++ ".tar.gz"),
do_check_file(Tar, regular),
Rel = ReleaseName ++ ".rel",
- extract_rel_file(filename:join("releases", Rel), Tar, Root),
+ _ = extract_rel_file(filename:join("releases", Rel), Tar, Root),
RelFile = filename:join(RelDir, Rel),
Release = check_rel(Root, RelFile, false),
#release{vsn = Vsn} = Release,
@@ -1841,14 +1841,12 @@ do_check_file(Master, FileName, Type) ->
%% by the user in another way, i.e. ignore this here.
%%-----------------------------------------------------------------
extract_rel_file(Rel, Tar, Root) ->
- erl_tar:extract(Tar, [{files, [Rel]}, {cwd, Root}, compressed]).
+ _ = erl_tar:extract(Tar, [{files, [Rel]}, {cwd, Root}, compressed]).
extract_tar(Root, Tar) ->
case erl_tar:extract(Tar, [keep_old_files, {cwd, Root}, compressed]) of
ok ->
ok;
- {error, Reason, Name} -> % Old erl_tar.
- throw({error, {cannot_extract_file, Name, Reason}});
{error, {Name, Reason}} -> % New erl_tar (R3A).
throw({error, {cannot_extract_file, Name, Reason}})
end.
diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl
index 587bd02cb2..f03b03dc08 100644
--- a/lib/sasl/src/systools_make.erl
+++ b/lib/sasl/src/systools_make.erl
@@ -1908,8 +1908,10 @@ del_tar(Tar, TarName) ->
file:delete(TarName).
add_to_tar(Tar, FromFile, ToFile) ->
- case erl_tar:add(Tar, FromFile, ToFile, [compressed, dereference]) of
+ case catch erl_tar:add(Tar, FromFile, ToFile, [compressed, dereference]) of
ok -> ok;
+ {'EXIT', Reason} ->
+ throw({error, {tar_error, {add, FromFile, Reason}}});
{error, Error} ->
throw({error, {tar_error, {add, FromFile, Error}}})
end.