From 332f7f15e381fb10347b527dbc72327ee3d18be5 Mon Sep 17 00:00:00 2001 From: Giedrius Zavadskis Date: Wed, 31 Mar 2021 10:29:44 +0300 Subject: [PATCH] Do resource cleanup only if resources have to be updated. (cherry picked from commit 37fed0570e1eb3ac520256761760a8e311889b51) --- .../com/threerings/getdown/launcher/Getdown.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java b/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java index b6f2a5f..59f084d 100644 --- a/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java +++ b/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java @@ -343,6 +343,13 @@ public abstract class Getdown if (_app.verifyMetadata(this)) { log.info("Application requires update."); update(); + + // do resource cleanup + final List cleanupPatterns = _app.cleanupPatterns(); + if (!cleanupPatterns.isEmpty()) { + cleanupResources(cleanupPatterns); + } + // loop back again and reverify the metadata continue; } @@ -425,12 +432,6 @@ public abstract class Getdown _readyToInstall = true; install(); - // do resource cleanup - final List cleanupPatterns = _app.cleanupPatterns(); - if (!cleanupPatterns.isEmpty()) { - cleanupResources(cleanupPatterns); - } - // Only launch if we aren't in silent mode. Some mystery program starting out // of the blue would be disconcerting. if (!_silent || _launchInSilent) {