From af0b7b7871fd41d7ce354df10e0211108467d55a Mon Sep 17 00:00:00 2001 From: zhaopeng <imzhpe@qq.com> Date: Wed, 16 Jan 2013 09:09:09 -0500 Subject: [PATCH] 添加中文语言 --- src/com/gitblit/RobotsTxtServlet.java | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/com/gitblit/RobotsTxtServlet.java b/src/com/gitblit/RobotsTxtServlet.java index c142be0..d66ebf4 100644 --- a/src/com/gitblit/RobotsTxtServlet.java +++ b/src/com/gitblit/RobotsTxtServlet.java @@ -24,7 +24,6 @@ import javax.servlet.http.HttpServletResponse; import com.gitblit.utils.FileUtils; -import com.gitblit.utils.StringUtils; /** * Handles requests for robots.txt @@ -55,13 +54,10 @@ protected void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException { - String robotstxt = GitBlit.getString(Keys.web.robots.txt, null); + File file = GitBlit.getFileOrFolder(Keys.web.robots.txt, null); String content = ""; - if (!StringUtils.isEmpty(robotstxt)) { - File robotsfile = new File(robotstxt); - if (robotsfile.exists()) { - content = FileUtils.readContent(robotsfile, "\n"); - } + if (file.exists()) { + content = FileUtils.readContent(file, "\n"); } response.getWriter().append(content); } -- Gitblit v1.9.1