From c710f6a4ea2231051a9e6406128d6e06af86e58e Mon Sep 17 00:00:00 2001 From: Mat Date: Thu, 7 May 2020 22:14:00 +0300 Subject: Remove old Android leftovers (#4722) --- src/WebAdmin.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/WebAdmin.cpp') 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 = "

404 Not Found

"; 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)) -- cgit v1.2.3