Merge branch 'stable-3.0' into stable-3.1

* stable-3.0:
  InitContainer: Do not copy if init is run from siteWar

Change-Id: Idafd2c52b366bebd4db2f5950b92d0eff5f08931
This commit is contained in:
David Pursehouse 2020-03-10 17:36:31 +09:00
commit 30a619ac51

View File

@ -75,7 +75,11 @@ class InitContainer implements InitStep {
final boolean copy;
final Path siteWar = site.gerrit_war;
if (Files.exists(siteWar)) {
copy = ui.yesno(true, "Upgrade %s", siteWar);
if (Files.isSameFile(siteWar, myWar)) {
copy = false;
} else {
copy = ui.yesno(true, "Upgrade %s", siteWar);
}
} else {
copy = ui.yesno(true, "Copy %s to %s", myWar.getFileName(), siteWar);
if (copy) {