Skip to content

Commit

Permalink
seek and ye shall read
Browse files Browse the repository at this point in the history
  • Loading branch information
grendello committed Oct 16, 2024
1 parent a52c507 commit c69913c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/native/monodroid/embedded-assemblies-zip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,19 +334,19 @@ EmbeddedAssemblies::zip_load_entries (int fd, const char *apk_name, [[maybe_unus
log_debug (LOG_ASSEMBLY, "Central directory size: %u", cd_size);
log_debug (LOG_ASSEMBLY, "Central directory entries: %u", cd_entries);

// off_t retval = ::lseek (fd, static_cast<off_t>(cd_offset), SEEK_SET);
// if (retval < 0) [[unlikely]] {
// Helpers::abort_application (
// LOG_ASSEMBLY,
// Util::monodroid_strdup_printf (
// "Failed to seek to central directory position in APK: %s. retval=%d errno=%d, File=%s",
// std::strerror (errno),
// retval,
// errno,
// apk_name
// )
// );
// }
off_t retval = ::lseek (fd, static_cast<off_t>(cd_offset), SEEK_SET);
if (retval < 0) [[unlikely]] {
Helpers::abort_application (
LOG_ASSEMBLY,
Util::monodroid_strdup_printf (
"Failed to seek to central directory position in APK: %s. retval=%d errno=%d, File=%s",
std::strerror (errno),
retval,
errno,
apk_name
)
);
}

const auto [prefix, prefix_len] = get_assemblies_prefix_and_length ();
ZipEntryLoadState state {
Expand Down

0 comments on commit c69913c

Please sign in to comment.