提交 1e9cc3b4 编写于 作者: K kohsuke

Fixed a possible "Cannot create a file when that file already exists"...

    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
上级 8ad45a5f
......@@ -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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册