From 6a18219b3b4f8ac484e83fb54c949449eef20e60 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 15 Oct 2024 16:29:28 +0200 Subject: [PATCH] seek and ye shall read --- .../monodroid/embedded-assemblies-zip.cc | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/native/monodroid/embedded-assemblies-zip.cc b/src/native/monodroid/embedded-assemblies-zip.cc index 56b6c61774d..cada4e6dbbf 100644 --- a/src/native/monodroid/embedded-assemblies-zip.cc +++ b/src/native/monodroid/embedded-assemblies-zip.cc @@ -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(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(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 {