Skip to content

Commit 7a19d41

Browse files
committed
seek and ye shall read
1 parent 7fcd23f commit 7a19d41

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
@@ -332,19 +332,19 @@ EmbeddedAssemblies::zip_load_entries (int fd, const char *apk_name, [[maybe_unus
332332
log_debug (LOG_ASSEMBLY, "Central directory size: %u", cd_size);
333333
log_debug (LOG_ASSEMBLY, "Central directory entries: %u", cd_entries);
334334

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

349349
const auto [prefix, prefix_len] = get_assemblies_prefix_and_length ();
350350
ZipEntryLoadState state {

0 commit comments

Comments
 (0)