summaryrefslogtreecommitdiffstats
path: root/src/WebAdmin.cpp
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-05-07 21:14:00 +0200
committerGitHub <noreply@github.com>2020-05-07 21:14:00 +0200
commitc710f6a4ea2231051a9e6406128d6e06af86e58e (patch)
treed86451d18434a1e02d8753ee2486d11068f69494 /src/WebAdmin.cpp
parentRemove coverity_scan branch reference (diff)
downloadcuberite-c710f6a4ea2231051a9e6406128d6e06af86e58e.tar
cuberite-c710f6a4ea2231051a9e6406128d6e06af86e58e.tar.gz
cuberite-c710f6a4ea2231051a9e6406128d6e06af86e58e.tar.bz2
cuberite-c710f6a4ea2231051a9e6406128d6e06af86e58e.tar.lz
cuberite-c710f6a4ea2231051a9e6406128d6e06af86e58e.tar.xz
cuberite-c710f6a4ea2231051a9e6406128d6e06af86e58e.tar.zst
cuberite-c710f6a4ea2231051a9e6406128d6e06af86e58e.zip
Diffstat (limited to 'src/WebAdmin.cpp')
-rw-r--r--src/WebAdmin.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp
index 9082044fa..eec30235e 100644
--- a/src/WebAdmin.cpp
+++ b/src/WebAdmin.cpp
@@ -143,7 +143,7 @@ void cWebAdmin::Stop(void)
bool cWebAdmin::LoadLoginPage(void)
{
- cFile File(FILE_IO_PREFIX "webadmin/login_template.html", cFile::fmRead);
+ cFile File("webadmin/login_template.html", cFile::fmRead);
if (!File.IsOpen())
{
return false;
@@ -198,16 +198,16 @@ void cWebAdmin::Reload(void)
}
m_TemplateScript.Create();
m_TemplateScript.RegisterAPILibs();
- if (!m_TemplateScript.LoadFile(FILE_IO_PREFIX "webadmin/template.lua"))
+ if (!m_TemplateScript.LoadFile("webadmin/template.lua"))
{
- LOGWARN("Could not load WebAdmin template \"%s\". WebAdmin will not work properly!", FILE_IO_PREFIX "webadmin/template.lua");
+ LOGWARN("Could not load WebAdmin template \"%s\". WebAdmin will not work properly!", "webadmin/template.lua");
m_TemplateScript.Close();
}
// Load the login template, provide a fallback default if not found:
if (!LoadLoginPage())
{
- LOGWARN("Could not load WebAdmin login page \"%s\", using fallback template.", FILE_IO_PREFIX "webadmin/login_template.html");
+ LOGWARN("Could not load WebAdmin login page \"%s\", using fallback template.", "webadmin/login_template.html");
// Set the fallback:
m_LoginPage = \
@@ -378,7 +378,7 @@ void cWebAdmin::HandleFileRequest(cHTTPServerConnection & a_Connection, cHTTPInc
// Read the file contents and guess its mime-type, based on the extension:
AString Content = "<h2>404 Not Found</h2>";
AString ContentType = "text/html";
- AString Path = Printf(FILE_IO_PREFIX "webadmin/files/%s", FileURL.c_str());
+ AString Path = Printf("webadmin/files/%s", FileURL.c_str());
// Return 404 if the file is not found, or the URL contains '../' (for security reasons)
if ((FileURL.find("../") == AString::npos) && cFile::IsFile(Path))