From c1c4cc2288c46579c8188160cd2cbc27437b53ad Mon Sep 17 00:00:00 2001 From: svoboda18 Date: Sat, 15 Jun 2024 14:46:06 +0100 Subject: [PATCH] fix: ino_extract_regular: do not decrement got * this a regression introduced in commit f2a1a24, which caused the ino_extract_regular() function to decrement the 'got' variable, thus makes the loop exits and leaves unextracted data for files size > 1 << 27. * correct the build date. Signed-off-by: svoboda18 --- e2fstool.c | 13 ++++++++++++- e2fstool.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/e2fstool.c b/e2fstool.c index a6e1616..ea8b170 100755 --- a/e2fstool.c +++ b/e2fstool.c @@ -378,7 +378,6 @@ errcode_t ino_extract_regular(ext2_filsys fs, ext2_ino_t ino, const char *path) goto close; } - got -= nbytes; written += nbytes; } while (got); @@ -578,6 +577,7 @@ static errcode_t walk_fs(ext2_filsys fs) return retval; } } + if (android_configure) { if (mountpoint) @@ -633,6 +633,17 @@ static errcode_t walk_fs(ext2_filsys fs) goto end; } +#ifdef SVB_MINGW + if (!android_configure_only) + { + retval = set_path_timestamp(out_dir, inode.i_atime, inode.i_mtime, inode.i_ctime); + if (retval) + { + E2FSTOOL_ERROR("while configuring timestamps for %s", out_dir); + } + } +#endif + if (!quiet && !verbose) ext2fs_numeric_progress_close(fs, &progress, "done\n"); end: diff --git a/e2fstool.h b/e2fstool.h index 21f1815..a098fda 100755 --- a/e2fstool.h +++ b/e2fstool.h @@ -14,7 +14,7 @@ #include #define E2FSTOOL_VERSION "1.0.0" -#define E2FSTOOL_DATE "16-July-2024" +#define E2FSTOOL_DATE "15-July-2024" #define E2FSTOOL_ERROR(pfx, ...) printf("%s: %s " pfx "\n", __func__, strerror(errno) __VA_OPT__(,) __VA_ARGS__)