From d97854be004a97223be0e3241c0c534df469dceb Mon Sep 17 00:00:00 2001 From: Lukasz Gromanowski Date: Thu, 23 Feb 2012 23:21:17 +0100 Subject: [PATCH] Bug fixes for configuration handling. Corrected retrieving installation path from wine registry on MacOS. Updated doxygen comments. Signed-off-by: Lukasz Gromanowski --- components/files/linuxpath.hpp | 2 +- components/files/macospath.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/files/linuxpath.hpp b/components/files/linuxpath.hpp index 873f8801d..48fdbb2ff 100644 --- a/components/files/linuxpath.hpp +++ b/components/files/linuxpath.hpp @@ -46,7 +46,7 @@ struct LinuxPath boost::filesystem::path getUserPath() const; /** - * \brief Return path to the global (system) configuration directory. + * \brief Return path to the global (system) directory where game files could be placed. * * \return boost::filesystem::path */ diff --git a/components/files/macospath.cpp b/components/files/macospath.cpp index 6225fc01f..fc36e2a9c 100644 --- a/components/files/macospath.cpp +++ b/components/files/macospath.cpp @@ -105,11 +105,16 @@ boost::filesystem::path MacOsPath::getInstallPath() const std::string line; std::string mwpath; - while (std::getline(file, line) && !line.empty()) + while (std::getline(file, line)) { if (line[0] == '[') // we found an entry { - isRegEntry = (line.find("Softworks\\Morrowind]") != std::string::npos); + if (isRegEntry) + { + break; + } + + isRegEntry = (line.find("Softworks\\\\Morrowind]") != std::string::npos); } else if (isRegEntry) {