From 06ae63123c94038b90153f4847de2c57c0193db8 Mon Sep 17 00:00:00 2001 From: Rafael Cavazin <rafaelcavazin@gmail.com> Date: Sun, 27 Jan 2013 09:46:50 -0500 Subject: [PATCH] updating current development --- 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