From: Yohei Endo Date: Thu, 6 Oct 2016 13:20:44 +0000 (+0900) Subject: Change skip behavior on extracting. X-Git-Url: http://git.osdn.net/view?p=lha%2Flha.git;a=commitdiff_plain;h=e7bb51c3db3d1472d1a75f293c3e1653c3429a57 Change skip behavior on extracting. Change "Skip" to skip all files which will be overwritten. --- diff --git a/src/lhext.c b/src/lhext.c index 648ced9..842b3e0 100644 --- a/src/lhext.c +++ b/src/lhext.c @@ -432,11 +432,11 @@ extract_one(afp, hdr) if (skip_flg == TRUE) { /* if skip_flg */ if (stat(name, &stbuf) == 0 && force != TRUE) { - if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) { + /* if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) {*/ if (quiet != TRUE) printf("%s : Skipped...\n", name); return read_size; - } + /* } */ } } if (noexec) { @@ -515,13 +515,15 @@ extract_one(afp, hdr) if (up_flag == FALSE && force == FALSE) { return read_size; } - } else { + } + + if (skip_flg == TRUE) { /* if skip_flg */ if (GETSTAT(name, &stbuf) == 0 && force != TRUE) { - if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) { + /* if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) { */ if (quiet != TRUE) printf("%s : Skipped...\n", name); return read_size; - } + /* } */ } }