From 47d6856e31a030d4523ed19eeae1eb53f4f3331f Mon Sep 17 00:00:00 2001 From: kohsuke Date: Fri, 19 Dec 2008 01:21:40 +0000 Subject: [PATCH] Windows service installer wasn't handling the situation correctly if Hudson is started at the installation target. (report) git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13734 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java b/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java index 33f95855c7..ba77ff3efd 100644 --- a/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java +++ b/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java @@ -96,7 +96,8 @@ public class WindowsInstallerLink extends ManagementLink { // copy files over there copy(req, rsp, dir, getClass().getResource("/windows-service/hudson.exe"), "hudson.exe"); copy(req, rsp, dir, getClass().getResource("/windows-service/hudson.xml"), "hudson.xml"); - copy(req, rsp, dir, hudsonWar.toURL(), "hudson.war"); + if(!hudsonWar.getCanonicalFile().equals(new File(dir,"hudson.war").getCanonicalFile())) + copy(req, rsp, dir, hudsonWar.toURL(), "hudson.war"); // install as a service ByteArrayOutputStream baos = new ByteArrayOutputStream();