Browse code

print temp filenames in cli_scanzip() (bb#138)

git-svn: trunk@2618

Tomasz Kojm authored on 2007/01/13 21:35:52
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sat Jan 13 13:33:53 CET 2007 (tk)
2
+---------------------------------
3
+  * libclamav/scanners.c: print temp filenames in cli_scanzip() (bb#138)
4
+
1 5
 Sat Jan 13 01:28:09 CET 2007 (tk)
2 6
 ---------------------------------
3 7
   * sigtool: ask for fl when building main.cvd
... ...
@@ -508,10 +508,15 @@ static int cli_scanzip(int desc, cli_ctx *ctx, off_t sfx_offset, uint32_t *sfx_c
508 508
 
509 509
 	zip_file_close(zfp);
510 510
 
511
-	if(!encrypted && size != zdirent.st_size) {
512
-	    cli_dbgmsg("Zip: Incorrectly decompressed (%d != %d)\n", size, zdirent.st_size);
513
-	    ret = CL_EZIP;
514
-	    break;
511
+	if(!encrypted) {
512
+	    if(size != zdirent.st_size) {
513
+		cli_dbgmsg("Zip: Incorrectly decompressed (%d != %d)\n", size, zdirent.st_size);
514
+		ret = CL_EZIP;
515
+		break;
516
+
517
+	    } else {
518
+		cli_dbgmsg("Zip: File decompressed to %s\n", tmpname);
519
+	    }
515 520
 	}
516 521
 
517 522
 	if(fflush(tmp) != 0) {