Skip to content

Commit 6a18219

Browse files
committed
seek and ye shall read
1 parent b1f7c2f commit 6a18219

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

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

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

337-
// off_t retval = ::lseek (fd, static_cast<off_t>(cd_offset), SEEK_SET);
338-
// if (retval < 0) [[unlikely]] {
339-
// Helpers::abort_application (
340-
// LOG_ASSEMBLY,
341-
// Util::monodroid_strdup_printf (
342-
// "Failed to seek to central directory position in APK: %s. retval=%d errno=%d, File=%s",
343-
// std::strerror (errno),
344-
// retval,
345-
// errno,
346-
// apk_name
347-
// )
348-
// );
349-
// }
337+
off_t retval = ::lseek (fd, static_cast<off_t>(cd_offset), SEEK_SET);
338+
if (retval < 0) [[unlikely]] {
339+
Helpers::abort_application (
340+
LOG_ASSEMBLY,
341+
Util::monodroid_strdup_printf (
342+
"Failed to seek to central directory position in APK: %s. retval=%d errno=%d, File=%s",
343+
std::strerror (errno),
344+
retval,
345+
errno,
346+
apk_name
347+
)
348+
);
349+
}
350350

351351
const auto [prefix, prefix_len] = get_assemblies_prefix_and_length ();
352352
ZipEntryLoadState state {

0 commit comments

Comments
 (0)