imageinfo: use nhttpd.conf as source for webif path

Origin commit data
------------------
Branch: ni/coolstream
Commit: a8955f0da8
Author: Thilo Graf <dbt@novatux.de>
Date: 2023-01-06 (Fri, 06 Jan 2023)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2023-01-06 22:26:46 +01:00
committed by vanhofen
parent a4a1128026
commit 8fb892309e

View File

@@ -585,7 +585,15 @@ void CImageInfo::hide()
string CImageInfo::getYWebVersion()
{
CConfigFile yConf('=', false);
yConf.loadConfig(CONFIGDIR "/nhttpd.conf");
std::string ver = yConf.getString("WebsiteMain.directory", "n/a") + "/Y_Version.txt";
CConfigFile yV('=', false);
yV.loadConfig(PRIVATE_HTTPDDIR "/Y_Version.txt");
return yV.getString("version", "n/a");
if (file_exists(ver.c_str()))
{
yV.loadConfig(ver);
return yV.getString("version", "n/a");
}
return "n/a";
}