From 5f56457576dbaedd8b8c228b245059bee3d8fcfc Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 9 Feb 2007 23:39:16 +0000 Subject: Check for nonexistent file git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6556 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_httpd.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/modules/m_httpd.cpp') diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index b2ede6619..3342ba37d 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -371,6 +371,8 @@ class ModuleHttpServer : public Module port = c.ReadInteger("http", "port", i, true); indexfile = c.ReadValue("http", "index", i); index = new FileReader(ServerInstance, indexfile); + if (!index->Exists()) + throw ModuleException("Can't read index file: "+indexfile); http = new HttpServerSocket(ServerInstance, bindip, port, true, 0, index); httpsocks.push_back(http); } -- cgit v1.3.1-10-gc9f91