Commit bdb97f4d authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Removed pluginsDirectory static variable due to possible misconfiguration if...

Removed pluginsDirectory static variable due to possible misconfiguration if JiveGlobal#homeDirectory was not initialized yet.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1643 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1ea5638c
......@@ -55,13 +55,11 @@ import java.util.concurrent.ConcurrentHashMap;
public class PluginServlet extends HttpServlet {
private static Map<String, HttpServlet> servlets;
private static File pluginDirectory;
private static PluginManager pluginManager;
private static ServletConfig servletConfig;
static {
servlets = new ConcurrentHashMap<String, HttpServlet>();
pluginDirectory = new File(JiveGlobals.getHomeDirectory(), "plugins");
}
public void init(ServletConfig config) throws ServletException {
......@@ -303,6 +301,7 @@ public class PluginServlet extends HttpServlet {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
return;
}
File pluginDirectory = new File(JiveGlobals.getHomeDirectory(), "plugins");
File image = new File(pluginDirectory, parts[1] + File.separator + "web" +
File.separator + "images" + File.separator + parts[3]);
if (!image.exists()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment