mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
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:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user