Skip to content

Commit 907bd19

Browse files
committed
seek and ye shall read
1 parent e542c9a commit 907bd19

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/native/mono/monodroid/embedded-assemblies-zip.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -350,19 +350,19 @@ EmbeddedAssemblies::zip_load_entries (int fd, const char *apk_name, [[maybe_unus
350350
log_debug (LOG_ASSEMBLY, "Central directory size: %u", cd_size);
351351
log_debug (LOG_ASSEMBLY, "Central directory entries: %u", cd_entries);
352352

353-
// off_t retval = ::lseek (fd, static_cast<off_t>(cd_offset), SEEK_SET);
354-
// if (retval < 0) [[unlikely]] {
355-
// Helpers::abort_application (
356-
// LOG_ASSEMBLY,
357-
// Util::monodroid_strdup_printf (
358-
// "Failed to seek to central directory position in APK: %s. retval=%d errno=%d, File=%s",
359-
// std::strerror (errno),
360-
// retval,
361-
// errno,
362-
// apk_name
363-
// )
364-
// );
365-
// }
353+
off_t retval = ::lseek (fd, static_cast<off_t>(cd_offset), SEEK_SET);
354+
if (retval < 0) [[unlikely]] {
355+
Helpers::abort_application (
356+
LOG_ASSEMBLY,
357+
Util::monodroid_strdup_printf (
358+
"Failed to seek to central directory position in APK: %s. retval=%d errno=%d, File=%s",
359+
std::strerror (errno),
360+
retval,
361+
errno,
362+
apk_name
363+
)
364+
);
365+
}
366366

367367
const auto [prefix, prefix_len] = get_assemblies_prefix_and_length ();
368368
ZipEntryLoadState state {

0 commit comments

Comments
 (0)