Mercurial > hg > index.cgi
changeset 431:6df8d62302e2
Fix error in --nopaths lwar option when replacing members
Fix missing logic update to handle --nopaths when replacing archive members.
author | David Flamand <dlflamand@gmail.com> |
---|---|
date | Wed, 16 Nov 2016 19:36:16 -0700 |
parents | e34c8bd6ea29 |
children | 58cafa61ab40 |
files | lwar/replace.c |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lwar/replace.c Wed Nov 16 10:14:06 2016 -0700 +++ b/lwar/replace.c Wed Nov 16 19:36:16 2016 -0700 @@ -153,11 +153,10 @@ doadd: for (i = 0; i < nfiles; i++) { - filename = get_file_name(files[i]); - f2 = fopen(filename, "rb"); + f2 = fopen(files[i], "rb"); if (!f2) { - fprintf(stderr, "Cannot open file %s:", filename); + fprintf(stderr, "Cannot open file %s:", files[i]); perror(""); exit(1); } @@ -223,7 +222,7 @@ fseek(f2, 0, SEEK_END); l = ftell(f2); fseek(f2, 0, SEEK_SET); - fputs(filename, nf); + fputs(get_file_name(files[i]), nf); fputc(0, nf); fputc(l >> 24, nf); fputc((l >> 16) & 0xff, nf);