From 6351872732fce77186f401050eee92c7c3aa3461 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 20 May 2023 17:04:15 +0200 Subject: libtar: add a dir_iterator_t implementation for tar files The existing istream_t wrapper is mered into this one as well, we can open the files via the iterators open_file_ro function. Unit tests and tar2sqfs are modified accordingly. Signed-off-by: David Oberhollenzer --- lib/io/src/win32/dir_iterator.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/io/src/win32/dir_iterator.c') diff --git a/lib/io/src/win32/dir_iterator.c b/lib/io/src/win32/dir_iterator.c index c9defc7..f504b65 100644 --- a/lib/io/src/win32/dir_iterator.c +++ b/lib/io/src/win32/dir_iterator.c @@ -91,6 +91,9 @@ static int dir_iterator_next(dir_iterator_t *it, dir_entry_t **out) ent->mode = S_IFDIR | 0755; } else { ent->mode = S_IFREG | 0644; + ent->size = w32->ent.nFileSizeHigh; + ent->size <<= 32UL; + ent->size |= w32->ent.nFileSizeLow; } ent->mtime = w32time_to_unix(&(w32->ent.ftLastWriteTime)); -- cgit v1.2.3