Archive: VPatch3 failed on multi-patch


VPatch3 failed on multi-patch
I found the latest VPatch3 can't work.

Hint to author:


case 255: // read the file modified time from the patch
if(!ReadFile(hPatch,&targetModifiedTime,sizeof(targetModifiedTime),&read,NULL)) {
return PATCH_CORRUPT;
}

I think there should be a time marker for each file need to be patched.
But I found new GenPat only create one time marker and added it to the end of patch file.
So, If I generated multi-patch into one patch, I can only apply the last one, and others will be failed.

HaHa, here is a stupid method to fix the bug:
open source-code file "apply_path.c" under "\Source\NSISPlugin\".
goto line 112
modify:


while (patch_blocks--) {

to:

while (--patch_blocks) {


If the author of VPatch read this post, I think he will know how to solve it.

The problem was actually that the generated patches are invalid/corrupt. As soon as you have more than one patch in a file, only the last one will work.

Upgrade to VPatch 3.0 RC7. There is a critical bugfix which should solve your corrupt patches (if you make them again from scratch :rolleyes: ).

Get it now: http://www.tibed.net/vpatch