diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-09-21 12:53:10 +0200 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-09-21 12:53:10 +0200 |
| commit | bf51f658d5aff2a39f37d99893d79a667108de10 (patch) | |
| tree | 463cc783892e1ba667220d63d8ed5220648203ba /src/Daemon/PluginManager.cpp | |
| parent | 902a90a214dc7c41e11375a051cadca826c71f7b (diff) | |
| parent | 317ebe45bdb9ecfdf1d44e98d84ea961bb48d111 (diff) | |
| download | abrt-bf51f658d5aff2a39f37d99893d79a667108de10.tar.gz abrt-bf51f658d5aff2a39f37d99893d79a667108de10.tar.xz abrt-bf51f658d5aff2a39f37d99893d79a667108de10.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/Daemon/PluginManager.cpp')
| -rw-r--r-- | src/Daemon/PluginManager.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp index be14f4b..a36d5a8 100644 --- a/src/Daemon/PluginManager.cpp +++ b/src/Daemon/PluginManager.cpp @@ -103,17 +103,16 @@ bool LoadPluginSettings(const std::string& pPath, map_plugin_settings_t& pSettin */ static bool SavePluginSettings(const std::string& pPath, const map_plugin_settings_t& pSettings) { - std::ofstream fOut; - fOut.open(pPath.c_str()); - if (fOut.is_open()) + FILE* fOut = fopen(pPath.c_str(), "w"); + if (fOut) { - fOut << "# Settings were written by abrt." << std::endl; - map_plugin_settings_t::const_iterator it; - for (it = pSettings.begin(); it != pSettings.end(); it++) + fprintf(fOut, "# Settings were written by abrt\n"); + map_plugin_settings_t::const_iterator it = pSettings.begin(); + for (; it != pSettings.end(); it++) { - fOut << it->first << " = " << it->second << std::endl; + fprintf(fOut, "%s = %s\n", it->first.c_str(), it->second.c_str()); } - fOut.close(); + fclose(fOut); return true; } return false; |
