imageinfo: use nhttpd.conf as source for webif path

This commit is contained in:
2022-12-04 19:38:44 +01:00
parent e74b54305d
commit ae85a76a31

View File

@@ -601,7 +601,15 @@ void CImageInfo::hide()
string CImageInfo::getYWebVersion() 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); CConfigFile yV('=', false);
yV.loadConfig(PRIVATE_HTTPDDIR "/Y_Version.txt"); if (file_exists(ver.c_str()))
return yV.getString("version", "n/a"); {
yV.loadConfig(ver);
return yV.getString("version", "n/a");
}
return "n/a";
} }