InitContainer: Do not copy if init is run from siteWar
If init is run from siteWar it makes no sense to copy the file since source = destination. Change-Id: I2c7f287b32669537e009082ec6cab823021223d4
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user