• R/O
  • HTTP
  • SSH
  • HTTPS

lha: Commit


Commit MetaInfo

Revisione7bb51c3db3d1472d1a75f293c3e1653c3429a57 (tree)
Time2016-10-06 22:20:44
AuthorYohei Endo <yoheie@gmai...>
CommiterYohei Endo

Log Message

Change skip behavior on extracting.

Change "Skip" to skip all files which will be overwritten.

Change Summary

Incremental Difference

--- a/src/lhext.c
+++ b/src/lhext.c
@@ -432,11 +432,11 @@ extract_one(afp, hdr)
432432
433433 if (skip_flg == TRUE) { /* if skip_flg */
434434 if (stat(name, &stbuf) == 0 && force != TRUE) {
435- if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) {
435+ /* if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) {*/
436436 if (quiet != TRUE)
437437 printf("%s : Skipped...\n", name);
438438 return read_size;
439- }
439+ /* } */
440440 }
441441 }
442442 if (noexec) {
@@ -515,13 +515,15 @@ extract_one(afp, hdr)
515515 if (up_flag == FALSE && force == FALSE) {
516516 return read_size;
517517 }
518- } else {
518+ }
519+
520+ if (skip_flg == TRUE) { /* if skip_flg */
519521 if (GETSTAT(name, &stbuf) == 0 && force != TRUE) {
520- if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) {
522+ /* if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) { */
521523 if (quiet != TRUE)
522524 printf("%s : Skipped...\n", name);
523525 return read_size;
524- }
526+ /* } */
525527 }
526528 }
527529
Show on old repository browser