]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Settings.cc
initial port to win32
[chaz/yoink] / src / Moof / Settings.cc
index 624179ce36998c16efed54b1b75414f97c7d28b7..6883ddc4f852d3edd4191957e81529f87f155c8a 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <boost/algorithm/string.hpp>
 
+#include "Log.hh"
 #include "Settings.hh"
 
 
@@ -104,7 +105,7 @@ void Settings::loadFromFiles(const std::vector<std::string>& filePaths,
 
                if (home)
                {
-                       boost::replace_first(path, "$HOME", home);
+                       boost::replace_all(path, "$HOME", home);
                }
 
                try
@@ -129,8 +130,8 @@ void Settings::loadFromFiles(const std::vector<std::string>& filePaths,
                }
                catch (Deserializer::Exception e)
                {
-                       std::cerr << "Cannot load settings from " << *it <<
-                               " because an exception was thrown: " << e.what() << std::endl;
+                       logWarning("cannot load settings from %s because an exception was"
+                                       "thrown: %s", (*it).c_str(), e.what());
                }
        }
 }
This page took 0.018205 seconds and 4 git commands to generate.