Software Update with apply the settings (Part6)

- Use identifier '#:' for config vars in settingsupdate.conf


Origin commit data
------------------
Branch: ni/coolstream
Commit: f4f954415b
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2012-11-03 (Sat, 03 Nov 2012)

Origin message was:
------------------
* Software Update with apply the settings (Part6)

- Use identifier '#:' for config vars in settingsupdate.conf


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2012-11-03 15:34:34 +01:00
parent 97f6724e1f
commit 346be4c475
2 changed files with 10 additions and 11 deletions

View File

@@ -385,7 +385,7 @@ bool CExtUpdate::copyFileList(const std::string & fileList, const std::string &
bool CExtUpdate::findConfigEntry(std::string & line, std::string find)
{
if (line.find(find + "=") == 0) {
if (line.find("#:" + find + "=") == 0) {
size_t pos = line.find_first_of('=');
line = line.substr(pos+1);
line = trim(line);
@@ -442,21 +442,20 @@ bool CExtUpdate::readBackupList(const std::string & dstPath)
size_t pos;
while(fgets(buf, sizeof(buf), f1) != NULL) {
std::string line = buf;
// remove comments
line = trim(line);
if (line.find_first_of("#") == 0)
// remove comments
if (line.find_first_of("#") == 0) {
if (line.find_first_of(":") == 1) { // config vars
if (line.length() > 1)
readConfig(line);
}
continue;
}
pos = line.find_first_of("#");
if (pos != std::string::npos) {
line = line.substr(0, pos);
line = trim(line);
}
// config vars
if (line.find_first_of("/+-~") != 0) {
if (line.length() > 1)
readConfig(line);
continue;
}
// special folders
else if ((line == "/") || (line == "/*") || (line == "/*.*") || (line.find("/dev") == 0) || (line.find("/proc") == 0) ||
(line.find("/sys") == 0) || (line.find("/mnt") == 0) || (line.find("/tmp") == 0)) {