Skip to content

Commit

Permalink
More debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
fpseverino committed Sep 21, 2024
1 parent 17547c3 commit c8b266d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Sources/CMinizip/unzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ static unzFile unzOpenInternal(const void *path, zlib_filefunc64_32_def *pzlib_f

us.filestream = ZOPEN64(us.z_filefunc, path, ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_EXISTING);

if (us.filestream == NULL)
puts("us.filestream is NULL");
if (us.filestream == NULL)
return NULL;

Expand Down Expand Up @@ -468,6 +470,7 @@ static unzFile unzOpenInternal(const void *path, zlib_filefunc64_32_def *pzlib_f
if (err != UNZ_OK)
{
ZCLOSE64(us.z_filefunc, us.filestream);
puts("err != UNZ_OK");
return NULL;
}

Expand Down
4 changes: 1 addition & 3 deletions Sources/Zip/Zip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ public class Zip {
// Begin unzipping
let zip = unzOpen64(path)
defer { unzClose(zip) }
let err = unzGoToFirstFile(zip)
if err != UNZ_OK {
if unzGoToFirstFile(zip) != UNZ_OK {
print("XXXXXXXXXXXXX - 1")
print(err)
throw ZipError.unzipFail
}
repeat {
Expand Down

0 comments on commit c8b266d

Please sign in to comment.