mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
configfile: don't do a full sync() after saving
Origin commit data
------------------
Branch: ni/coolstream
Commit: 804bed4e73
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-02-23 (Sat, 23 Feb 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
Jacek Jendrzej
parent
6a10324417
commit
66a4c73f2d
@@ -91,17 +91,18 @@ bool CConfigFile::loadConfig(const std::string & filename)
|
||||
|
||||
bool CConfigFile::saveConfig(const char * const filename)
|
||||
{
|
||||
std::ofstream configFile(filename);
|
||||
std::fstream configFile(filename);
|
||||
|
||||
if (configFile != NULL)
|
||||
{
|
||||
std::cout << "[ConfigFile] saving " << filename << std::endl;
|
||||
for (ConfigDataMap::const_iterator it = configData.begin(); it != configData.end(); ++it)
|
||||
{
|
||||
configFile << it->first << "=" << it->second << std::endl;
|
||||
}
|
||||
|
||||
configFile.sync();
|
||||
configFile.close();
|
||||
sync();
|
||||
|
||||
chmod(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
|
||||
|
Reference in New Issue
Block a user