uprava souboru

This commit is contained in:
2023-08-28 08:01:54 +02:00
parent eaf88b506a
commit ed2cf088a6

View File

@@ -5,7 +5,6 @@
#include "utils.h"
#include "pugixml.hpp"
#define CID_LENGTH 32
#define CSD_LENGTH 32
@@ -60,8 +59,13 @@ PlcLicence::PlcLicence()
/// @param dataFileName
void PlcLicence::processConfigFile(string &dataFileName)
{
string fullFile = getCompletePath(dataFileName);
const int fileNameLength = fullFile.length();
char fileName[fileNameLength] = {};
getCharsFromString(fullFile, fileName, fileNameLength);
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file("licData.xml");
pugi::xml_parse_result result = doc.load_file(fileName);
if (result)
{
this->stationName = doc.child("data").child("station").child_value();