aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2011-08-19 08:47:01 +0200
committerHans Bolinder <[email protected]>2011-08-19 08:47:01 +0200
commitf228e2ab690a974face95911a29a1e5a5a7ffaf5 (patch)
treeab46431c9f35f038b4eb7db5bb1a64f925c73c75 /lib
parentaeaf6c7dc59ccba8fda3e581bfa44dc718edad55 (diff)
parent338d144c10d575108b7913e2e1d1ee5664736ef7 (diff)
downloadotp-f228e2ab690a974face95911a29a1e5a5a7ffaf5.tar.gz
otp-f228e2ab690a974face95911a29a1e5a5a7ffaf5.tar.bz2
otp-f228e2ab690a974face95911a29a1e5a5a7ffaf5.zip
Merge branch 'hb/correction_zip_open/OTP-9472' into dev
* hb/correction_zip_open/OTP-9472: Fix a bug in zip:zip_open/1,2.
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/src/zip.erl6
-rw-r--r--lib/stdlib/test/zip_SUITE.erl3
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/stdlib/src/zip.erl b/lib/stdlib/src/zip.erl
index 5a939dfa0a..c82c8159b6 100644
--- a/lib/stdlib/src/zip.erl
+++ b/lib/stdlib/src/zip.erl
@@ -223,7 +223,7 @@ openzip_open(F, Options) ->
do_openzip_open(F, Options) ->
Opts = get_openzip_options(Options),
#openzip_opts{output = Output, open_opts = OpO, cwd = CWD} = Opts,
- Input = get_zip_input(F),
+ Input = get_input(F),
In0 = Input({open, F, OpO -- [write]}, []),
{[#zip_comment{comment = C} | Files], In1} =
get_central_dir(In0, fun raw_file_info_etc/5, Input),
@@ -489,7 +489,7 @@ do_list_dir(F, Options) ->
%% Print zip directory in short form
-spec(t(Archive) -> ok when
- Archive :: file:name() | binary | ZipHandle,
+ Archive :: file:name() | binary() | ZipHandle,
ZipHandle :: pid()).
t(F) when is_pid(F) -> zip_t(F);
@@ -513,7 +513,7 @@ do_t(F, RawPrint) ->
%% Print zip directory in long form (like ls -l)
-spec(tt(Archive) -> ok when
- Archive :: file:name() | binary | ZipHandle,
+ Archive :: file:name() | binary() | ZipHandle,
ZipHandle :: pid()).
tt(F) when is_pid(F) -> zip_tt(F);
diff --git a/lib/stdlib/test/zip_SUITE.erl b/lib/stdlib/test/zip_SUITE.erl
index d5f2cd52d4..7233c061ef 100644
--- a/lib/stdlib/test/zip_SUITE.erl
+++ b/lib/stdlib/test/zip_SUITE.erl
@@ -375,7 +375,8 @@ zip_options(Config) when is_list(Config) ->
ok = file:set_cwd(?config(data_dir, Config)),
%% Create a zip archive
- {ok, Zip} = zip:zip("filename_not_used.zip", Names, [memory, {cwd, PrivDir}]),
+ {ok, {_,Zip}} =
+ zip:zip("filename_not_used.zip", Names, [memory, {cwd, PrivDir}]),
%% Open archive
{ok, ZipSrv} = zip:zip_open(Zip, [memory]),