Install in the loop we already have.

Also don't create a valid marker file. Patch files are deleted immediately
after use.
This commit is contained in:
Michael Bayne
2018-12-17 11:25:35 -08:00
parent faa9d2422e
commit 5d1bdbfb3f
@@ -677,11 +677,6 @@ public abstract class Getdown extends Thread
setStep(Step.DOWNLOAD); setStep(Step.DOWNLOAD);
download(list); download(list);
// install the patch files (renaming them from _new)
for (Resource rsrc : list) {
rsrc.install(true);
}
// and apply them... // and apply them...
setStep(Step.PATCH); setStep(Step.PATCH);
updateStatus("m.patching"); updateStatus("m.patching");
@@ -692,6 +687,9 @@ public abstract class Getdown extends Thread
int ii = 0; for (Resource prsrc : list) { int ii = 0; for (Resource prsrc : list) {
ProgressObserver pobs = pragg.startElement(ii++); ProgressObserver pobs = pragg.startElement(ii++);
try { try {
// install the patch file (renaming them from _new)
prsrc.install(false);
// now apply the patch
Patcher patcher = new Patcher(); Patcher patcher = new Patcher();
patcher.patch(prsrc.getLocal().getParentFile(), prsrc.getLocal(), pobs); patcher.patch(prsrc.getLocal().getParentFile(), prsrc.getLocal(), pobs);
} catch (Exception e) { } catch (Exception e) {