Fixed a possible "Cannot create a file when that file already exists" error in managed Windows slave launcher.

<a href="http://www.nabble.com/%22Cannot-create-a-file-when-that-file-already-exists%22---huh--td23949362.html#a23950643">report</a>

SmbFile.mkdirs() behave differently to File.mkdirs(), and it fails if the directory already exists.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@19321 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-06-30 15:54:59 +00:00
1 parent 8ad45a5f10
commit 1e9cc3b4e3
1 file changed
+3 -2
@@ -117,8 +117,9 @@ public class ManagedWindowsServiceLauncher extends ComputerLauncher {
logger.println(Messages.ManagedWindowsServiceLauncher_DotNetRequired());
return;
}
remoteRoot.mkdirs();
if(!remoteRoot.exists())
remoteRoot.mkdirs();
// copy exe
logger.println(Messages.ManagedWindowsServiceLauncher_CopyingSlaveExe());